- Build image
docker-compose build
- Start image as container
docker-compose up
- Run psql inside the postgres container
docker exec -it database psql -U postgres
- Run tests
docker exec -it webserver npm run test
- list databases
\l
- create database:
CREATE DATABASE koa_api;
- switch to a database
\c koa_api
- show tables in the current schema
\dt
Resources:
- Add close() methods for db and cache
- Allow shorthand HttpResponse construction
- Investigate 'Bad Request' response on malformed JSON requests (probably koa?)
- Have a more thoughtfull directory structure for the volumes in Docker
- Investigate @koa/cors and when it's necessary
- Investigate deploying only a Docker image that clones in all supporting files
- Add an entrypoint.js type module for running migrations etc..
- Maybe use GMT format for cookie.expires
- Maybe allow nested routes
- config -> settings, views -> pages, routes -> urls
- Maybe allow ...args in DataShape field constraints
- How can database content be persistent accross image/container destruction?
- When is database content destroyed, and where is it contained?
- How and when should migration/seeding be performed?
- What's the best way to dependency-invert knex?
- What tools are available for automated semantic versioning?
- What's a better interface than DataShape.test(), and how should you create instances of a DataShape?
- Maybe use
fits()
orsatisfiedBy()
- What's a good way to separate boolean responses to those functions from error oriented ones?
- Maybe use
- How considerate should DataShape be to the idea that an adapter will make a table from it?
- Probably not at all...
- Does this mean that it should drop its constraints property altogether?