Skip to content

ErikaEspejo/panaderia-api

Repository files navigation

Node APIRest - Bakery Information System

yarn  Node.js  Express  Sequelize  MySQL 

Prerequisites

Before starting

Make sure you have yarn installed, run on console.

> yarn --version

If it return an error, please install yarn.

> npm install -g yarn

Clone the repo

> git clone https://github.com/ErikaEspejo/panaderia-api.git

Enter to folder project

> cd panaderia-api

Install the app

> yarn

Create .env file

  • 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=

Install nodemon as development dependency

> yarn add -D nodemon

Run the app

Without nodemon

Run project without nodemon

> yarn start

With nodemon

Run project with nodemon

> yarn run dev

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published