8000 GitHub - gustavo-candido/poc: mvp
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

gustavo-candido/poc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Requirements

  • Node (version ref: v14.15.3)
  • Docker (version ref: 20.10.8)

Instalation

  • Download the repo
  • go for backend directory (cd backend)
  • run npm install

Running

  • go for backend directory (cd backend)
  • run docker-compose up for start the express web server and the Postgres container

Config database

  • Ensure your Postgres container is running
  • go for backend directory (cd backend)
  • run docker-compose exec app npx knex --knexfile src/db/knexfile.ts migrate:latest to create the tables, seeds and so

Available routes

Importing routes with insomnia

Run in Insomnia}

import routes gif

DB

  • go for backend directory (cd backend)

Create migration

npx knex --migrations-directory ./src/db/migrations migrate:make migration_name -x ts

Run migration

docker-compose exec app npx knex --knexfile src/db/knexfile.ts migrate:latest

0