A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/firmanJS/express-boillerplate-restfullapi below:

firmanJS/express-boillerplate-restfullapi: boillerplate restfullapi build with expressjs and mongodb

Express Boillerplate RestfullApi With MongoDB

  1. authentication with jwt, login, logout, register, blacklist token, logout jwt
  2. verifiy route with jwt
  3. crud example
  4. error handling
  5. database use no sql mongodb mongoose
  6. testing with mocha and chai
  7. coverage use istanbull
  8. with docker example
  9. validiation, use express-valdator
  10. pagination example
  11. custom message api response
  12. eslint airbnb base
copy environment variable
# install package
npm install or yarn install

#  running app
npm run dev or yarn dev

# running unit tetsing
npm run test or yarn test
# start aplication with docker
make docker-start 

# stop docker container
make docker-stop 

# remove docker container
make docker-down 
fill in the copied environment earlier
APP_PORT=2000
TZ=Asia/Jakarta
MONGO_SERVICE=# uri mongodb
AUTH_SOURCE= #auth service
SECRET_KEY= #jwt secret key here

#Mongodb config
MONGO_PORT=27017
MONGO_INITDB_ROOT_USERNAME= #username
MONGO_INITDB_ROOT_PASSWORD= #password
MONGO_INITDB_DATABASE= #db name
docker-compose up --build
or run with background process
docker-compose up --build -d
execution npm with container docker
# install package
docker-compose exec boillerplate npm install

# running unit testing
docker-compose exec boillerplate npm run test

in file documentation.json export to your postman

.
├── api/              * all api file here
├── config/           * all configuration file here
|   └── db.js         * configuration database
├── middleware/       * all middleware file here, for check before next to api
├── models/           * all models schema file here
|   └── attributes    * custom your attribute if line is to long
|   └── function      * custom function mongose schema
├── routes/           * all file route here
|   └── index.js      * register all route
├── static/           * all configuration swagger
|   └── path          * custom your path api
|   └── schema        * custom schema body
├── test/             * all test file here
|   └── index.js      * test apps
├── utils/            * all utils file here
|   └── crud.js       * for basic crud if same 


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4