Skip to content

jackey8616/lodestar-server

 
 

Repository files navigation

Nest Logo

A progressive Node.js framework for building efficient and scalable server-side applications.

NPM Version Package License NPM Downloads CircleCI Coverage Discord Backers on Open Collective Sponsors on Open Collective Support us

Description

Nest framework TypeScript starter repository.

Installation

$ yarn install

Running the app

# development
$ yarn run start

# watch mode
$ yarn run start:dev

# production mode
$ yarn run start:prod

Test

# unit tests
$ yarn run test

# e2e tests
$ yarn run test:e2e

# test coverage
$ yarn run test:cov

Test Db configuration

同步遠端 Hasura 的 PostgreSQL 結構至本機指定位置 (./migrations/hasura 資料夾)

hasura migrate create Init --from-server --endpoint hasuraServerEndpoint --admin-secret secret --project migrations/hasura/

用新的 migration sql 替換掉原本的 1680330156157_Init sql,再刪掉新的 migration sql,留 1680330156157_Init 就好

套用最新資料庫結構前,需關閉所有容器並清除掛載(volume)

docker volume ls
docker volume rm lodestar-server_postgresdb

重新 up 所有容器後,套用最新資料庫結構以及資料 seeding

docker-compose -f docker-compose.yml --profile test up -d

hasura migrate apply --endpoint http://localhost:8080/ --database-name default --project migrations/hasura --skip-update-check

hasura sd apply --endpoint http://localhost:8080/ --database-name default --project migrations/hasura --skip-update-check

Support

Nest is an MIT-licensed open source project. It can grow thanks to the sponsors and support by the amazing backers. If you'd like to join them, please read more here.

Stay in touch

License

Nest is MIT licensed.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 69.4%
  • PLpgSQL 28.3%
  • Handlebars 2.3%