A stayshare platform This platform allows people to accommodate others for an agreed period of time. Stayshare offers a unique way to share your space and experiences with others.
An Express based RESTful API design was used to access a MongoDB database for data storage and retrieval. Using JWT tokens to provide stateless authenticated access for retreiving and storing data in persistent storage.
This API provides the following Endpoints check the documentation here:
This project is Bootstrapped with with the following stack:
- Node (Javacript runtime).
- Express (For creating endpoints, routing, and serving files).
- TypeScript (A super set of Javacript).
- Jest (for testing).
- jsonwebtoken (JWT) (for stateless interaction).
- mongoDB Atlas (An integrated suite of cloud database and data services to accelerate and simplify how you build with data.).
- mongoose(Mongoose provides a straight-forward, schema-based solution to model your application data.)
All of the dependencies required are listed in the package.json file. Use npm install
on the command line. Environment variables are defined in a example.env file.
However, you will need to install node and mongoDB globally on your local machine
The following steps outline will set you up on how to install the app on your local machine.
- Clone this repository
git clone https://github.com/salimkarbm/stayshare.git
- From the terminal, change directory to stayshare folder
cd stayshare
-
Run
npm install
This will install the necessary packages and dependencies based on the supplied package.json. -
Then run the app with the command
npm run start:dev
-
Once these are set, connect to your cloud or local database.
To run jest test use the following commands:
npm run testdb
this will run migration for test database.
To run models and endpoints test run the following command
npm run test
run the following command to drop the test database
npm run drop-testdb
The endpoints available for interacting with the API can be found in the Documentation here
Contributions are currently not allowed ❌ but please feel free to submit issues and feature requests ✅
Github:@salimkarbm
LinkedIn:Salim Imuzai
Twitter:@salimkarbm
- Give a ⭐ if you like this project