Skip to content

renatozr/store-manager-api

Repository files navigation

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
    git clone git@github.com:renatozr/store-manager-api.git
  2. Enter the directory
    cd store-manager-api
  3. Install NPM packages
    npm install
  4. Rename .env.example file to .env
  5. Fill in the environment variables (example below)
    PORT=3001
    MYSQL_HOST=localhost
    MYSQL_PORT=3306
    MYSQL_USER=root
    MYSQL_PASSWORD=password
  6. Setup database
    npm run initdb
  7. Run the project
    npm run dev
  8. Run the project tests
    npm test