Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/renatozr/store-manager-api
- Owner: renatozr
- Created: 2024-08-15T20:05:06.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2024-08-16T03:05:05.000Z (4 months ago)
- Last Synced: 2024-10-01T05:15:06.168Z (3 months ago)
- Topics: chai, expressjs, joi-validation, mocha, mysql, sinon
- Language: JavaScript
- Homepage:
- Size: 93.8 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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
```