Skip to content
Open
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
3 changes: 3 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
PORT = 4000
HOST = localhost
NODE_ENV = development
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/node_modules
/dist
npm-debug.log*
.env
.env
products.json
53 changes: 53 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
## Instalation:

```
npm install
```

## Environment variables

Create `.env` file based on `.env.example`

## Runnig application

### Run in development mode:

```
npm run start:dev
```

### Run in production mode:

```
npm run start:prod
```

### Run in cluster mode:

```
npm run start:multi
```

## Testing

```
npm run test
```

or use next one for running in watch mode

```
npm run test:watch
```

## API endpoins

`GET /api/products` - to get all products

`POST /api/products` - to create new product

`GET /api/products/:id` - to get product by id

`PUT /api/products/:id` - to update product

`DELETE /api/products/:id` - to delete product
Loading