This is my API Framework which apply ExpressJS
- NodeJS
- TypeScript
- Swagger UI
- OpenAPI Validation
- Node version:
v10.15.3
- NPM version:
v6.4.1
- Python:
v2.x
node-gyp
- Windows users will need the options for c# and c++ installed with their visual studio instance.
server.host
inconfig.ts
file (not recommended)server.port
inconfig.ts
file (running port)server.public
inconfig.ts
file (public IP or Domain)env
inconfig.ts
file (Environment variable)pepper
inconfig.ts
file (static string to hash password)
# Common
ENV=dev
# Server
SERVER_HOST=127.0.0.1
SERVER_PORT=8080
SERVER_PUBLIC_HOST=127.0.0.1
SERVER_PUBLIC_PORT=8080
SERVER_SCHEMA=http
# JWT
JWT_KEY="ViralWorks@2018#"
JWT_EXPIRE=2h
# Document
ENABLE_DOCUMENT=true
# Security
ENABLE_RBAC=true
# MongoDB V4
MONGO_HOST=206.189.82.47
MONGO_PORT=27017
MONGO_USERNAME=main_vw_v3
MONGO_PASSWORD="main_vw_v3@123"
MONGO_DB=main_vw_v3
MONGO_DEBUG=true
$ cd <path_of_project>
$ npm install --global node-gyp
$ npm install
Please follow my bellow progress:
$ cd <path_of_project>
$ npm start
Show command helper
$ cd <path_of_project>
$ ./command
To watch changed file and re-run server
$ cd <path_of_project>
$ npm run watch
Server will be run on: <schema>://<host_or_address>:<port>/<version>/
By default:
http://127.0.0.1:8080/v1.0/
Document will be run on: <schema>://<host_or_address>:<port>/<version>/docs/
By default:
http://127.0.0.1:8080/v1.0/docs/
Powered by Daniel Huynh - [email protected]