This is a basic Espress server that includes Dynamic API performing CRUD Operations on a database.
npm install
Set your PORT and Database environment with an .env file
PORT=3001
SQL_CONNECTION_STRING=postgres://localhost:5434/database_name
READ:
method: GET
route: /food
READ ONE:
method: GET
route: /food/id
params:
name{String}
type{String}
CREATE:
method: POST
route: /food
params:
name{String}
type{String}
UPDATE:
method: PUT
route: /food/id
params:
name{String}
type{String}
DELETE:
method: DELETE
route: /food/id
params:
name{String}
type{String}
Ekaterina Khoroshilova