Skip to content

steffFrank/NODE_FOOD_PROJECT

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

51 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NODE FOOD PROJECT API

About the project

This project involves developing a RESTful JSON API for a food company's group-buying management system. The API will provide comprehensive functionality for managing users, products, and orders. Key operations include the ability to add, update, and delete these entities. Additionally, it will offer a feature to retrieve a comprehensive list of all the orders placed. This API will serve as an essential tool for effectively organizing and maintaining the group-buying activities within the company.

Built With

  • ExpressJs
  • MongoDb
  • NodeJs
  • Typescript

Installation

  1. Clone the repo
git clone https://github.com/steffFrank/NODE_FOOD_PROJECT.git
  1. Install NPM packages
npm install  
  1. MongoDb
    You will need 2 mongodb urls
    create an .env file and store them as:
  • MONGODB_URL: your_mongodb_url
  • TEST_MONGODB_URL: your_mongodb_url_for_tests
  1. security
    The API was created using https protocol, therefore you will need a self-signed certificate and a key. You can create them with this line of code.
openssl req -x509 -newkey rsa:4096 -nodes -keyout key.pem -out cert.pem -days 365 
  1. Start the server
npm start  
  1. Run the tests - executed on the .ts files in src folder
npm test  
  1. Run the build - Results in the dist folder
npm run build    

Usage

Run in Postman

  • To place an order, you need to be sure that the products and users exist

  • To update the order, change the orderId variable with the new one you want to update

  • Run the following to be sure all the tests are passing

License

MIT license

Contact

Steff Frank - [email protected]

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published