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
- Host: GitHub
- URL: https://github.com/caiquecastro/equipments-crud
- Owner: caiquecastro
- Created: 2020-05-14T21:27:54.000Z (about 6 years ago)
- Default Branch: main
- Last Pushed: 2024-03-28T21:46:15.000Z (about 2 years ago)
- Last Synced: 2024-04-15T01:57:34.187Z (about 2 years ago)
- Topics: express, knex, nodejs, objectionjs, sqlite3
- Language: JavaScript
- Size: 376 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
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
```