/atticus-test

Primary LanguageTypeScript

Setup/Run

  1. Install database
$ docker-compose up
$ psql -h localhost -p 5432 -U user -d songs
  1. Setup db
$ npx knex migrate:latest # creates table
$ npx seed:run # inserts 1 row
  1. Install dependencies and run app
$ npm install
$ npm run start
  1. Use curl or some other REST client to validate

Testing

$ npm t

DB

$ npx knex migrate:make <INSERT_MIGRATION_NAME_HERE> # creates a new migration file

TODO

  • properly type uuid
  • add updatedAt and createdAt for rows
  • use test db instead of dev db for tests

Roadmap

  • better client error messages
  • authentication
  • dockerize service

Stack

  • Node (v15.7.0)
  • Typescript (v4.4.3)
    • koa (server)
    • knex (pg connection)
  • Docker
  • PostgresQL