Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mohammedessehemy/survey-center
Survey center APIs
https://github.com/mohammedessehemy/survey-center
nestjs nodejs postgresql
Last synced: 11 days ago
JSON representation
Survey center APIs
- Host: GitHub
- URL: https://github.com/mohammedessehemy/survey-center
- Owner: MohammedEssehemy
- Created: 2022-04-03T21:18:11.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2022-04-03T21:59:09.000Z (almost 3 years ago)
- Last Synced: 2024-12-09T01:29:40.237Z (2 months ago)
- Topics: nestjs, nodejs, postgresql
- Language: TypeScript
- Homepage:
- Size: 89.8 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Survey Center
NodeJs APIs to serve as backend for anonymous surveys app, uses PostgreSQL for persistence.
## Running the app
### docker version (recommended)
- This is the recommended way, since it will handle the database and migrations automatically.
- Make sure you have docker installed
- Run the app
```bash
yarn start:docker
```### bare metal
- copy `.env.example` to `.env` and change the `PG_URL` pointing to the PostgreSQL db
- Run the migrations using `yarn migration:run`
- Run the app
```bash
yarn start:dev
```- Or run in debugging mode
```bash
yarn start:debug
```### OpenAPI
- App starts on port 3000 by default
- call `localhost:3000/` to validate the server is up
- Navigate to `localhost:3000/docs` to get the openAPI docs or use the `swagger.json` in the project directory
## Test
```bash
yarn test
```## Migrations
- Migrations are handled using [typeorm](https://github.com/typeorm/typeorm)
- To generate new migration, run the following:
```bash
yarn migration:generate -n
```- To run pending migrations, run the following
```bash
yarn migration:run
```