The open source RESTful API Point Of Sales
- Create User without Role management
- Authentication and Authorization
- Category Management
- Create Category
- Get Categories
- Get Category by ID which contains Products
- Update Category
- Delete Category
- Product Management
- Create Product without Image
- Get Products with Pagination
- Get Product by ID
- Update Product
- Delete Product
- Orders
- Create Order
- Get Orders with Pagination
- Get Order by ID
Clone this repository in your local directory
git clone https://github.com/afustrator/iapp-api.git
Next, go to the directory iapp-api
and install all dependencies using npm
.
cd iapp-api
npm install
Set up the .env
file by following the code below.
NODE_ENV=development
# Server Configuration
HOST=localhost
PORT=5000
# Node Postgre Configuration
PGUSER= # Add local postgre username
PGPASSWORD= # Add local postgre password
PGDATABASE= # Add local postgre database
PGHOST= # Add local postgre host
PGPORT= # Add local postgre port
# JWT Token
ACCESS_TOKEN_KEY= # Add with a random string or whatever it is
REFRESH_TOKEN_KEY= # Add with a random string or whatever it is
ACCESS_TOKEN_AGE= # Add with number
After you setup the database and environment variable, run the migration table.
npm run migrate up
Run the server and it was ready to use at http://localhost:5000
.
npm run dev
Soon