名称俗吧?
- Express.js as the web framework.
- ES2017+ support with Babel.
- Automatic polyfill requires based on environment with babel-preset-env.
- Linting with ESLint.
- Testing with Jest.
- Quick deployment guide for Heroku, AWS Elastic Beanstalk, and App Engine.
- 增加了redis/memcached对session的支持
- 增加了Bookshelf
# Clone the project
git clone git@github.com:vmasto/express-babel.git
cd express-babel
# Make it your own
rm -rf .git && git init && npm init
# Install dependencies
npm install
# or if you're using Yarn
yarn
Then you can begin development:
# yarn
yarn run dev
# npm
npm run dev
This will launch a nodemon process for automatic server restarts when your code changes.
暂时没用到
Linting is set up using ESLint. It uses ESLint's default eslint:recommended rules. Feel free to use your own rules and/or extend another popular linting config (e.g. airbnb's or standard).
Begin linting in watch mode with:
# yarn
yarn run lint
# npm
npm run lint
To begin linting and start the server simultaneously, edit the package.json
like this:
"dev": "nodemon src/index.js --exec \"node -r dotenv/config -r babel-register\" | npm run lint"
Deployment is specific to hosting platform/provider but generally:
# yarn
yarn run build
# npm
npm run build
will compile your src
into /dist
, and
# yarn
yarn start
# npm
npm start
will run build
(via the prestart
hook) and start the compiled application from the /dist
folder.
The last command is generally what most hosting providers use to start your application when deployed, so it should take care of everything.
You can find small guides for Heroku, App Engine and AWS in the deployment document.
- apidoc请自行全局安装,这样就不用安装在依赖中直接
apidoc -i src/app/Http/Controller -o public/apidoc
MIT License. See the LICENSE file.