https://github.com/devafortun/e-commerce-with-typescript-nodejs-express
https://github.com/devafortun/e-commerce-with-typescript-nodejs-express
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/devafortun/e-commerce-with-typescript-nodejs-express
- Owner: devafortun
- License: mit
- Created: 2024-12-25T18:53:25.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-12-25T18:56:58.000Z (over 1 year ago)
- Last Synced: 2025-08-01T20:55:34.966Z (11 months ago)
- Language: TypeScript
- Size: 235 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Security: SECURITY.md
Awesome Lists containing this project
README
# e-commerce backend 🚀
### [](https://skillicons.dev) [](https://skillicons.dev) [](https://skillicons.dev) [](https://skillicons.dev)
## Requirements
For development, you will only need Node.js and a node global package, Yarn, installed in your environement.
### Node
Just go on [official Node.js website](https://nodejs.org/) and download the installer.
Also, be sure to have `git` available in your PATH, `npm` might need it (You can find git [here](https://git-scm.com/)).
### Yarn installation
After installing node, this project will need yarn too, so just run the following command.
$ npm install -g yarn
---
## Install
$ git clone https://github.com/YOUR_USERNAME/PROJECT_TITLE
$ cd PROJECT_TITLE
$ yarn install
## Create a .env file in the root directory and add the following environment variables
PORT
MONGOS_CONNECTION_LINK
## Running the project
$ yarn start
## Simple build for production
$ yarn build
---
## End points
### Product
| Method | Endpoint | Description |
|:-:|:-:|:-:|
| GET | / | get all products |
| GET | /:id | get a specific product |
| POST | / | add new product |
| DELETE | /:id | delete product |
| PUT | /:id | update product |
### User
| Method | Endpoint | Description |
|:-:|:-:|:-:|
| GET | / | get all users |
| GET | /:id | get a specific user |
| POST | /register | create new user |
| POST | /login | authenticate user |
| DELETE | /:id | delete user |
| PUT | /:id | update user |
| PUT | /change-password/:id | change password |
---
## Collections
### User
```javascript
name: String,
email: String,
password: String
```
### Product
```javascript
name:String,
description: String,
price: Number,
colors: Array,
sizes: Array
```