Express server that performs banana searches, stores users, and manages their favorite bananas in a JSON file. This project is designed to demonstrate the integration of these technologies for a basic web application for a banana web shop.
Before you begin, make sure you have the following installed:
- Node.js and npm
-
Clone the repository:
git clone https://github.com/thejoltjoker/FSU23D-checkout-session.git cd FSU23D-checkout-session/server
-
Install dependencies:
npm install
-
Create a
.env
file in the project root and add the following:PORT=3000 SESSION_SECRET=my-session-secret STRIPE_API_KEY=sk_test_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX POSTNORD_API_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx RESEND_API_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-
Start the server with the following command:
npm run start
POST http://localhost:3000/api/user/register
POST http://localhost:3000/api/user/login
POST http://localhost:3000/api/user/logout
GET http://localhost:3000/api/user/authorize
GET http://localhost:3000/api/checkout/session/:sessionId
POST http://localhost:3000/api/checkout/session/create
POST http://localhost:3000/api/orders/save
GET http://localhost:3000/api/orders/:orderId
GET http://localhost:3000/api/products/
GET http://localhost:3000/api/products/:productId
GET http://localhost:3000/api/products/promotions/check/:promoCode
GET http://localhost:3000/api/shipping/service-points/45330