Server application to order tortas
Run project in development mode:
npm run start-dev
Generate JS code, for production mode:
npm run build
Remove production code:
npm run clean
Run project in production mode:
npm run production
Generate documentation:
npm run apidoc
This app uses the following technologies:
It's recommended to have basic knowledge of those technologies before working with this project.
It's neccesary install global dependencies:
npm install -g nyc mocha source-map-support apidoc
Download and install dependencies:
git clone https://github.com/ksquareincmx/poc-chef-server.git
cd poc-chef-server
npm install
Set enviroment variables:
cp env.example .env
It's necessary to generate google oauth
credentials and jwt secret
, and set enviroment variables.
Generate jwt secret:
printf "%s\n" $(openssl rand -base64 32 | tr -dc 0-9A-Za-z | head -c 40)
Generate google oauth2 credentials
Execute project in localhost:
npm run start-dev
You must see the next output:
> [email protected] start-dev /home/user/poc-chef-server
> DEBUG=chef:* NODE_ENV=development nodemon
[nodemon] 1.18.9
[nodemon] to restart at any time, enter `rs`
[nodemon] watching: /home/mike/GitHub/Ksquare/poc-chef-server/api/**/*
[nodemon] starting `ts-node ./api/server.ts`
chef:orders:api:configuration Configuration API-Chef-Orders: getting configurations... +0ms
chef:orders:app app loading... +0ms
chef:orders:server Server Running on port: 3000 +0ms
Execute docker compose:
docker-compose build
docker-compose up
TODO: add server configuration
Run project first: npm run start-dev
or npm run production
Run test: npm run test
You can see the API documentation in dev mode following the next steps:
npm run apidoc
npm run start-dev
See documentation: localhost:3000/apidoc
, if you are running your project in production mode you can access change localhost:port
by your URL