https://github.com/libercosoft/mainstack-test-server
A simple RESTful API to create and manage products in a store with users authentication.
https://github.com/libercosoft/mainstack-test-server
Last synced: 8 months ago
JSON representation
A simple RESTful API to create and manage products in a store with users authentication.
- Host: GitHub
- URL: https://github.com/libercosoft/mainstack-test-server
- Owner: LIBERCOSOFT
- Created: 2023-12-06T08:13:10.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-12-08T21:51:25.000Z (over 2 years ago)
- Last Synced: 2025-01-18T14:49:39.566Z (over 1 year ago)
- Language: TypeScript
- Homepage:
- Size: 98.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 📗 Table of Contents
- [📗 Table of Contents](#-table-of-contents)
- [📖 Server ](#-server-)
- [🛠 Built With ](#-built-with-)
- [Tech Stack ](#tech-stack-)
- [Key Features ](#key-features-)
- [🚀 Live Demo ](#-live-demo-)
- [💻 Getting Started ](#-getting-started-)
- [Prerequisites](#prerequisites)
- [Install \& Setup](#install--setup)
- [👥 Authors ](#-authors-)
- [🔭 Future Features ](#-future-features-)
- [🙏 Acknowledgments ](#-acknowledgments-)
**Server** is a simple CRUD (Create, Read, Update, Delete) application that manages the product in a store coupled with user authentication.
Server
- **Persist a new product**
- **Retrieve all products**
- **Delete a saved product**
- **Retrieve one product**
- **Create new user**
- **Authenticate a saved user**
- **Logout a saved user**
[Live Demo Link](https://mainstack-test-server.onrender.com)
> To start and run this project with npm
```
npm install
```
```
npm run server
```
```
visit http://localhost:5050
```
> To start and run this project with docker
- Build a docker image first, use this command:
```
docker build -t mainstack-server .
```
- Run your docker container with this command:
```
docker run -p 5050:5050 -d mainstack-server
```
- Check your container logs with the container id you got from the above command with this command:
```
sudo docker logs 'container-id'
```
- Visit the server below:
```
http://localhost:5050
```
To get a local copy up and running, follow these steps.
### Prerequisites
- IDE / Editor
- Git
- NodeJS
### Install & Setup
To setup and install this sample ROR Blog project, follow the below steps:
- Clone this project by the command:
```
$ git clone hhttps://github.com/LIBERCOSOFT/mainstack-test-server
```
- Then switch to the project folder by the below query:
```
$ cd transport_system_server
```
- Create and fill a '.env' file using the .env.example
- Install npm dependencies with the command below:
```
$ npm install
```
- Start the development server with the command below:
```
$ npm run server
```
👤 **Kolapo Precious Akinrinlola**
- GitHub: [LIBERCOSOFT](https://github.com/LIBERCOSOFT)
- Twitter: [@Gerfieldt](https://twitter.com/Gerfieldt)
- LinkedIn: [Kolapo Akinrinlola](https://linkedin.com/in/kolapo-akinrinlola)
## 🔭 Future Features
- [ ] **Add an accounting feature to calculate cost of all products**
- [ ] **Add an inventory functionality to add and remove from number of a product's stock**
- [Mainstack](https://www.mainstack.co)