Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,5 @@ dist/
.index/
*.log
.idea/
coverage/
.vscode/*
!.vscode/launch.json
.vscode/
coverage/
29 changes: 0 additions & 29 deletions .vscode/launch.json

This file was deleted.

42 changes: 1 addition & 41 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,29 +10,10 @@ This version of the boilerplate is still in beta, so might contain abstractions

## How to run the server

### Requisites
* To run the project wit Docker you need to have Docker installed in your computer: [Docker](https://docs.docker.com/engine/install/)
* To run locally you need to have project dependencies installed globally in your machine

During development, the project can be run in two different ways.

### With Docker

If you want to just run the application in development mode, use the following command:

```sh
$ docker compose up
```

To run the application in debug mode in a way that the execution will stop when a debugger statement is called, use:

```sh
$ docker-compose -f docker-compose.yaml -f docker-compose.debug.yaml up
```

### Locally

If you want to just run the application in development mode, use the following command:
```sh
$ yarn dev
```
Expand Down Expand Up @@ -63,19 +44,9 @@ $ yarn remote [server address] [REPL port]

## Tests

The boilerplate is prepared to run tests using Jest. We usually group the tests in folders called `__tests__` (following Jest convention) for each module of the application. To run the tests use the following commands:
The boilerplate is prepared to run tests using Jest. We usually group the tests in folders called `__tests__` (following Jest convention) for each module of the application. To run the tests use the following command:

### With Docker
```sh
$ docker compose up

$ yarn test
```

### Locally
```sh
$ yarn dev

$ yarn test
```

Expand Down Expand Up @@ -110,17 +81,6 @@ This boilerplate follows ideas from multiple good software development practices

To run your app in production mode, you'll need to follow these steps:

### With Docker

1. Define any environment variable important for production
2. Go to `docker-compose.production.yaml` file, and add necessary configurations
3. Run the following command:
```sh
$ docker-compose -f docker-compose.yaml -f docker-compose.production.yaml up
```

### Locally

1. Build the application with `yarn build`
2. Define any environment variable important for production
3. Start the app with `yarn start`
Expand Down
6 changes: 0 additions & 6 deletions docker-compose.debug.yaml

This file was deleted.

3 changes: 0 additions & 3 deletions docker-compose.production.yaml

This file was deleted.

1 change: 0 additions & 1 deletion docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ services:
- .:/api
ports:
- 3000:3000
- 2580:2580
environment:
HOST: 0.0.0.0
DB_HOST: mongodb://node-api-boilerplate-mongodb:27017
Expand Down
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,9 @@
},
"scripts": {
"prebuild": "rimraf dist",
"start": "node . --transpile-only --files .| pino-pretty -c -l",
"build": "tsc -p tsconfig.prod.json",
"dev": "tsnd --transpile-only --files src/index.ts | pino-pretty -c -l",
"debug": "tsnd --transpile-only --inspect=0.0.0.0:9229 --nolazy --files src/index.ts | pino-pretty -c -l",
"debug": "tsnd --transpile-only --inspect --files src/index.ts | pino-pretty -c -l",
"cli": "tsnd --transpile-only --files src/index.ts --cli",
"remote": "ts-node bin/replClient.ts",
"test": "jest"
Expand Down
1 change: 0 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
"outDir": "./dist",
"rootDir": "./src",
"removeComments": false,
"inlineSourceMap": true,
"strict": true,
"noImplicitAny": false,
"noUnusedLocals": true,
Expand Down