Skip to content
This repository has been archived by the owner on Aug 16, 2024. It is now read-only.

awesome-crew/swifter-api-archive

Repository files navigation

Swifter server

Nest.js, TypeORM

Table of contents

Documentations

Installation

$ npm install

Getting Started

$ npm install # install dependencies
$ npm run set # execute mysql container
$ npm run migrate # execute all migration files
$ npm run start:dev # run development server (watch mode)

Commands

Docker

you should execute docker-compose to run development server

# execute docker-compose
$ npm run set

# clear docker containers
$ npm run set:down

Running the app

# run
$ npm run start

# development - watch mode
$ npm run start:dev

# production mode
$ npm run start:prod

TypeORM:Migration

We use migrations to manage database changes

# generate migation file by codebase change
# e.g. npm run makemigrations UpdateUser
# you can find generated file in src/database/migrations
$ npm run makemigrations <MIGRATION_NAME>

# apply existing migration files
$ npm run migrate

# revert last-applied migration
$ npm run migrate:revert

# list applied migrations
$ npm run migrations

Check

Includes lint, type, unit test

# lint
$ npm run check:lint

# type check
$ npm run check:type

# unit test
$ npm run check:test

# run all checks parallely (it's fast!!)
$ npm run check

How to deploy

Commits pushed to the main branch are automatically deployed. (via GitHub Action)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages