https://github.com/ferdiozer/address-book
Address Book
https://github.com/ferdiozer/address-book
docker fastify microservices mongodb nodejs reactjs
Last synced: about 2 months ago
JSON representation
Address Book
- Host: GitHub
- URL: https://github.com/ferdiozer/address-book
- Owner: ferdiozer
- Created: 2022-04-21T15:12:49.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2022-04-27T13:28:20.000Z (about 3 years ago)
- Last Synced: 2025-01-17T22:11:58.464Z (3 months ago)
- Topics: docker, fastify, microservices, mongodb, nodejs, reactjs
- Language: JavaScript
- Homepage:
- Size: 886 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Address Book
Microservice architecture
### Service
**Node JS**
```
cd services/auth
npm i
npm start
```### Client (web)
**React JS**
```
cd client/web
npm i
npm start
```#### pm2
```
# Start all applications
pm2 start ecosystem.config.js# Stop all
pm2 stop ecosystem.config.js# Restart all
pm2 restart ecosystem.config.js# Reload all
pm2 reload ecosystem.config.js# Delete all
pm2 delete ecosystem.config.js
```#### services
**main**
**auth**##### Api Docs
###### AUTH
```
// base URL = "http://localhost:6201/api/v1"POST
/users (new user)
request body
{
name:"",
email:"",
password:""
}POST
/login
request body
{
email:"",
password:""
}
response
{
"result": {
"userId": "62640a6b26302b462c90b8e3",
"created": "2022-04-25T09:52:42.943Z",
"_id": "62666f6a786e07e3fdbd8ec8",
"user": {
"_id": "62640a6b26302b462c90b8e3",
"name": "Test",
"email": "[email protected]",
"username": "",
"created": "2022-04-23T14:17:15.693Z"
}
}
}GET
/users
request header
{
Authorization:"62640beee9d031a6b771f7f2",
}
response
{
"result": {
"_id": "62640beee9d031a6b771f7f2",
"userId": "62640a6b26302b462c90b8e3",
"created": "2022-04-23T14:23:42.375Z",
"user": {
"_id": "62640a6b26302b462c90b8e3",
"name": "Test",
"email": "[email protected]",
"username": "",
"created": "2022-04-23T14:17:15.693Z"
}
}
}```