This is a Next.js project bootstrapped with create-next-app.
First, install dependencies and then run the development server:
# install
yarn
# run
yarn devOpen http://localhost:3000 with your browser to see the page.
docker run -v "$PWD/blog-data":/var/lib/postgresql/data -p 5432:5432 -e POSTGRES_USER=blog -e POSTGRES_HOST_AUTH_METHOD=trust -d postgresnotice: It's very important to add ; at the end of your sql sentence or it won't work.
docker exec -it <id> bash
psql -U blog
CREATE DATABASE development ENCODING 'UTF8' LC_COLLATE 'en_US.utf8' LC_CTYPE 'en_US.utf8';you can change ormconfig.json to connect your database well.
notice: define table name in camel case because typeorm will create foreign key with camel case.
yarn run migration:runyarn run seed:db