Skip to content

Commit d5f7b95

Browse files
authored
Merge pull request #42 from Visual-Regression-Tracker/82-local-setup
Local sedup doc added
2 parents 4eded8e + 5de90f4 commit d5f7b95

File tree

2 files changed

+30
-88
lines changed

2 files changed

+30
-88
lines changed

README.md

Lines changed: 13 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -1,75 +1,17 @@
1-
<p align="center">
2-
<a href="http://nestjs.com/" target="blank"><img src="https://nestjs.com/img/logo_text.svg" width="320" alt="Nest Logo" /></a>
3-
</p>
1+
# Backend app for [Visual Regression Tracker](https://github.com/Visual-Regression-Tracker/Visual-Regression-Tracker)
42

5-
[travis-image]: https://api.travis-ci.org/nestjs/nest.svg?branch=master
6-
[travis-url]: https://travis-ci.org/nestjs/nest
7-
[linux-image]: https://img.shields.io/travis/nestjs/nest/master.svg?label=linux
8-
[linux-url]: https://travis-ci.org/nestjs/nest
9-
10-
<p align="center">A progressive <a href="http://nodejs.org" target="blank">Node.js</a> framework for building efficient and scalable server-side applications, heavily inspired by <a href="https://angular.io" target="blank">Angular</a>.</p>
11-
<p align="center">
12-
<a href="https://www.npmjs.com/~nestjscore"><img src="https://img.shields.io/npm/v/@nestjs/core.svg" alt="NPM Version" /></a>
13-
<a href="https://www.npmjs.com/~nestjscore"><img src="https://img.shields.io/npm/l/@nestjs/core.svg" alt="Package License" /></a>
14-
<a href="https://www.npmjs.com/~nestjscore"><img src="https://img.shields.io/npm/dm/@nestjs/core.svg" alt="NPM Downloads" /></a>
15-
<a href="https://travis-ci.org/nestjs/nest"><img src="https://api.travis-ci.org/nestjs/nest.svg?branch=master" alt="Travis" /></a>
16-
<a href="https://travis-ci.org/nestjs/nest"><img src="https://img.shields.io/travis/nestjs/nest/master.svg?label=linux" alt="Linux" /></a>
17-
<a href="https://coveralls.io/github/nestjs/nest?branch=master"><img src="https://coveralls.io/repos/github/nestjs/nest/badge.svg?branch=master#5" alt="Coverage" /></a>
18-
<a href="https://gitter.im/nestjs/nestjs?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=body_badge"><img src="https://badges.gitter.im/nestjs/nestjs.svg" alt="Gitter" /></a>
19-
<a href="https://opencollective.com/nest#backer"><img src="https://opencollective.com/nest/backers/badge.svg" alt="Backers on Open Collective" /></a>
20-
<a href="https://opencollective.com/nest#sponsor"><img src="https://opencollective.com/nest/sponsors/badge.svg" alt="Sponsors on Open Collective" /></a>
21-
<a href="https://paypal.me/kamilmysliwiec"><img src="https://img.shields.io/badge/Donate-PayPal-dc3d53.svg"/></a>
22-
<a href="https://twitter.com/nestframework"><img src="https://img.shields.io/twitter/follow/nestframework.svg?style=social&label=Follow"></a>
23-
</p>
24-
<!--[![Backers on Open Collective](https://opencollective.com/nest/backers/badge.svg)](https://opencollective.com/nest#backer)
25-
[![Sponsors on Open Collective](https://opencollective.com/nest/sponsors/badge.svg)](https://opencollective.com/nest#sponsor)-->
3+
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/7d43b68b39cd41aa830120371be736ad)](https://www.codacy.com/gh/Visual-Regression-Tracker/backend?utm_source=github.com&utm_medium=referral&utm_content=Visual-Regression-Tracker/backend&utm_campaign=Badge_Grade)
264

27-
## Description
5+
[![Codacy Badge](https://app.codacy.com/project/badge/Coverage/7d43b68b39cd41aa830120371be736ad)](https://www.codacy.com/gh/Visual-Regression-Tracker/backend?utm_source=github.com&utm_medium=referral&utm_content=Visual-Regression-Tracker/backend&utm_campaign=Badge_Coverage)
286

29-
[Nest](https://github.com/nestjs/nest) framework TypeScript starter repository.
7+
## Local setup
308

31-
## Installation
32-
33-
```bash
34-
$ npm install
35-
```
36-
37-
## Running the app
38-
39-
```bash
40-
# development
41-
$ npm run start
42-
43-
# watch mode
44-
$ npm run start:dev
45-
46-
# production mode
47-
$ npm run start:prod
48-
```
49-
50-
## Test
51-
52-
```bash
53-
# unit tests
54-
$ npm run test
55-
56-
# e2e tests
57-
$ npm run test:e2e
58-
59-
# test coverage
60-
$ npm run test:cov
61-
```
62-
63-
## Support
64-
65-
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](https://docs.nestjs.com/support).
66-
67-
## Stay in touch
68-
69-
- Author - [Kamil Myśliwiec](https://kamilmysliwiec.com)
70-
- Website - [https://nestjs.com](https://nestjs.com/)
71-
- Twitter - [@nestframework](https://twitter.com/nestframework)
72-
73-
## License
74-
75-
Nest is [MIT licensed](LICENSE).
9+
- clone repo
10+
- Update `.env` and `prisma/.env`
11+
- Make sure Postgres is up and running
12+
- `npm i`
13+
- `npm run test`
14+
- Create DB structure and apply migrations `npx prisma migrate up -c --experimental`
15+
- `npm run test:e2e`
16+
- Seed initial data `npx ts-node prisma/seed.ts`
17+
- `npm run start:debug`

docker-compose.yml

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
version: "3.7"
22
services:
3-
api:
4-
# build:
5-
# context: .
6-
# dockerfile: Dockerfile
7-
# environment:
8-
# DATABASE_URL: postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB}
9-
# JWT_SECRET: ${JWT_SECRET}
10-
# JWT_LIFE_TIME: ${JWT_LIFE_TIME}
11-
# IMG_UPLOAD_FOLDER: ${IMG_UPLOAD_FOLDER}
12-
# BODY_PARSER_JSON_LIMIT: ${BODY_PARSER_JSON_LIMIT}
13-
# APP_FRONTEND_URL: ${APP_FRONTEND_URL}
14-
# ports:
15-
# - "${APP_PORT}:3000"
16-
# expose:
17-
# - "${APP_PORT}"
18-
# depends_on:
19-
# - postgres
3+
# api:
4+
# build:
5+
# context: .
6+
# dockerfile: Dockerfile
7+
# environment:
8+
# DATABASE_URL: postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB}
9+
# JWT_SECRET: ${JWT_SECRET}
10+
# JWT_LIFE_TIME: ${JWT_LIFE_TIME}
11+
# IMG_UPLOAD_FOLDER: ${IMG_UPLOAD_FOLDER}
12+
# BODY_PARSER_JSON_LIMIT: ${BODY_PARSER_JSON_LIMIT}
13+
# APP_FRONTEND_URL: ${APP_FRONTEND_URL}
14+
# ports:
15+
# - "${APP_PORT}:3000"
16+
# expose:
17+
# - "${APP_PORT}"
18+
# depends_on:
19+
# - postgres
2020
postgres:
2121
image: postgres:12
2222
restart: always

0 commit comments

Comments
 (0)