https://github.com/ernie1234/shortit-v2-backend
https://github.com/ernie1234/shortit-v2-backend
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/ernie1234/shortit-v2-backend
- Owner: Ernie1234
- Created: 2025-02-12T23:45:38.000Z (4 months ago)
- Default Branch: master
- Last Pushed: 2025-02-24T21:23:07.000Z (4 months ago)
- Last Synced: 2025-02-24T22:28:42.625Z (4 months ago)
- Language: TypeScript
- Size: 576 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Node TypeORM Template
This template gets you started with Node.js TypeORM Postgres faster.## Requirements
- [Node v18+](https://nodejs.org/)
- [Docker](https://www.docker.com/)## Running the app
set up the development environment with the following steps1. clone the repository
2. Run `npm i` command
3. create a `.env` file in the root directory and copy the contents of `.env.example` into it
4. Run `npm run docker:build` command, to build the docker container
5. Run `npm run docker:run` command, to run the docker container## Commit message format
Commit messages must meet [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/) format.
Run `npm run prepare` to install husky hooks.## Migrations
Set `syncDatabase` to `false` in [data-source.ts](src/data-source.ts) to enable migrations. Then run the following commands
- Run `npm run migration:generate -- ./src/migrations/` to generate a migration file. For example `npm run migration:generate -- ./src/migrations/create-users-table`
- Run `npm run migration:run` to run migrations
- Run `npm run migration:revert` to revert migrations