An open API service indexing awesome lists of open source software.

https://github.com/caiquecastro/equipments-crud

REST API to manage equipments
https://github.com/caiquecastro/equipments-crud

express knex nodejs objectionjs sqlite3

Last synced: 5 months ago
JSON representation

REST API to manage equipments

Awesome Lists containing this project

README

          

# Equipments CRUD

## Running locally

### Requirements

* Node.js (v18+)

### Installation

Installing dependencies.

```bash
$ npm install
```

Create the .env file. You can copy it from the example.

```bash
$ cp .env.example .env
```

Running the migrations.

```bash
$ npm run migrate
```

### Running the application

```
$ yarn start
```

## Running on docker

### Requirements

* Docker (v19.03+)
* Docker Compose (v1.24+)

### Installation

Create the .env file. You can copy it from the example.

```bash
$ cp .env.example .env
```

### Running the application

```
$ docker compose up -d
```

### Running without docker compose

Build the docker image

```
$ docker build . --tag equipments-crud
```

Start a container with the recently created image

```
$ docker run --rm -d -p 3000:3000 equipments-crud
```

## Endpoints

```
GET /equipments List of equipments
POST /equipments Create an equipment
GET /equipments/{id} Get an equipment details
PATCH /equipments/{id} Update an equipment details
DELETE /equipments/{id} Deletes an equipment
```