SellCars Customer module is a Backend server that handles CRUD operations for customers. Made with Node.js, Express and Jsonwebtoken
Use the package manager npm to install all required dependencies.
cd sellcars-backend
npm install
To start the typescript project use:
npm start
To build the project as javascript into the ./dist folder use:
npm run build
The project has the function to insert three test users: To execute that function use:
node ./testing/insertUsers.js
To test the backend we can use tools like Postman or HTTPie available API endpoints are:
http://localhost:3000/auth/login
http://localhost:3000/api/customers (Get all customers)
http://localhost:3000/api/customers/:id (Get customer by Id)
http://localhost:3000/api/customers (Create customer)
http://localhost:3000/api/customers/:id (Update customer)
http://localhost:3000/api/customers/:id (Delete customer)
JWT_SECRET=
JWT_EXPIRES_IN=
MONGODB_URI=
The project will be updated in the near future as a "side project". Developed by Jacob R.