Skip to content

diedu89/snacks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

62 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Snack Store api

Little api to manage a snacks inventory

How to run

docker and docker-compose are needed to get the enviroment up and running

To start the application just run the following command in a terminal within the project directory

$ docker-compose up

Sequelize will create the corresponding tables to match models and the api will be available at http://localhost:3000

Seed data

In a second terminal enter app container and run command to seed

docker-compose exec --user node web sh
$ ./node_modules/.bin/sequelize db:seed:all

Access database commandline

In a different terminal enter to database container

$ docker-compose exec postgres sh

Once inside just use psql

$ PGPASSWORD=secretsnacks psql -U applaudo -d snacks

Databse schema

Alt text

About

Little api to manage a snacks inventory

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published