Make sure you have yarn installed, run on console.
> yarn --versionIf it return an error, please install yarn.
> npm install -g yarn> git clone https://github.com/ErikaEspejo/panaderia-api.git> cd panaderia-api> yarn- Configuration Example:
- HTTP_HOST -> IP of server.
- HTTP_PORT -> Node listening port.
- LOG_ACCESS -> Path where the logs will be stored, don't specify the path, just the file name, default
access.log. - JWTKEY -> Is used by JWT to sign the token.
- SALT_ROUNDS -> Controls how much time is needed to calculate a single BCrypt hash, default is 10.
- DB_USER -> User of the database you are connecting to.
- DB_PASS -> Password of the database you are connecting to.
- DB_SCHEMA -> Database schema to connect.
- DB_DIALECT -> It refers to the database management system (/* one of 'mysql' | 'mariadb' | 'postgres' | 'mssql' */).
Rename .env.example to .env, and set parameters required, please don't include env:.
env:
# These are the parameters required.
HTTP_HOST=
HTTP_PORT=
LOG_ACCESS=
JWTKEY=
SALT_ROUNDS=
DB_USER=
DB_PASS=
DB_SCHEMA=
DB_DIALECT=
> yarn add -D nodemonRun project without nodemon
> yarn startRun project with nodemon
> yarn run dev