Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/renatozr/store-manager-api

An API that manages products and sales from a store
https://github.com/renatozr/store-manager-api

chai expressjs joi-validation mocha mysql sinon

Last synced: 3 months ago
JSON representation

An API that manages products and sales from a store

Awesome Lists containing this project

README

        


Store Manager API


An API that manages products and sales from a store



## About The Project

To exercise RESTful API development, unit testing, JOI validation and MySQL.

## Getting Started

### Prerequisites

- NPM
- MySQL

### Installation

1. Clone the repo
```sh
git clone [email protected]:renatozr/store-manager-api.git
```
2. Enter the directory
```sh
cd store-manager-api
```
3. Install NPM packages
```sh
npm install
```
4. Rename .env.example file to .env
5. Fill in the environment variables (example below)
```sh
PORT=3001
MYSQL_HOST=localhost
MYSQL_PORT=3306
MYSQL_USER=root
MYSQL_PASSWORD=password
```
6. Setup database
```sh
npm run initdb
```
7. Run the project
```sh
npm run dev
```
8. Run the project tests
```sh
npm test
```