danielfsousa/express-rest-boilerplate
danielfsousa/express-rest-boilerplate has 2,354 GitHub stars and 604 forks. GitHot measured 0 stars in 24 hours, 0 in 7 days, and -1 in 15 days. Last checked 2026-11-08 18:43 UTC. Last push 2024-06-30.
⌛️ Express starter for building RESTful APIs
What you can do
- No transpilers, just vanilla javascript
- ES2017 latest features like Async/Await
- Express + MongoDB (Mongoose)
- Consistent coding styles with editorconfig
Measured star growth
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- -1
- in 1 month
- Update delayed
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
README.md
OriginalExpress ES2017 REST API Boilerplate
Boilerplate/Generator/Starter Project for building RESTful APIs and microservices using Node.js, Express and MongoDB
Features
- No transpilers, just vanilla javascript
- ES2017 latest features like Async/Await
- CORS enabled
- Uses yarn
- Express + MongoDB (Mongoose)
- Consistent coding styles with editorconfig
- Docker support
- Uses helmet to set some HTTP headers for security
- Load environment variables from .env files with dotenv
- Request validation with joi
- Gzip compression with compression
- Linting with eslint
- Tests with mocha, chai and sinon
- Code coverage with istanbul and coveralls
- Git hooks with husky
- Logging with morgan
- Authentication and Authorization with passport
- API documentation generation with apidoc
- Continuous integration support with travisCI
- Monitoring with pm2
Requirements
- Node v7.6+ or Docker
- Yarn
Getting Started
Clone the repo and make it yours:
git clone --depth 1 https://github.com/danielfsousa/express-rest-es2017-boilerplate
cd express-rest-es2017-boilerplate
rm -rf .git
Install dependencies:
yarn
Set environment variables:
cp .env.example .env
Running Locally
yarn dev
Running in Production
yarn start
Lint
# lint code with ESLint
yarn lint
# try to fix ESLint errors
yarn lint:fix
# lint and watch for changes
yarn lint:watch
Test
# run all tests with Mocha
yarn test
# run unit tests
yarn test:unit
# run integration tests
yarn test:integration
# run all tests and watch for changes
yarn test:watch
# open nyc test coverage reports
yarn coverage
Validate
# run lint and tests
yarn validate
Logs
# show logs in production
pm2 logs
Documentation
# generate and open api documentation
yarn docs
Docker
# run container locally
yarn docker:dev
# run container in production
yarn docker:prod
# run tests
yarn docker:test
Deploy
Set your server ip:
DEPLOY_SERVER=127.0.0.1
Replace my Docker username with yours:
nano deploy.sh
Run deploy script:
yarn deploy
Tutorials
Inspirations
License
Explore related projects
codecrafters-io/build-your-own-x
Master programming by recreating your favorite technologies from scratch.
561,171 starspublic-apis/public-apis
A collective list of free APIs
497,378 starsmorluto/rea
Reverse engineer anything with agents, from app behavior down to native binaries.
444,756 starsopenclaw/openclaw
The AI that really does things. Any OS. Any Platform. The lobster way. 🦞
394,222 stars