Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ab70/next-express-pg-auth
https://github.com/ab70/next-express-pg-auth
adminer docker nextjs nodejs postgresql redis
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/ab70/next-express-pg-auth
- Owner: ab70
- Created: 2024-02-28T19:28:03.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2024-03-17T07:52:40.000Z (9 months ago)
- Last Synced: 2024-03-17T08:52:17.542Z (9 months ago)
- Topics: adminer, docker, nextjs, nodejs, postgresql, redis
- Language: JavaScript
- Homepage:
- Size: 81.1 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# Setup
## Docker
### Step 1 :
```
sudo docker compose up -d
```
This will create docker for redis, postgres and adminer
### Step 2:
```
cd backend/
npm i
npm run dev```
Backend will be running on localhost:4000
### Step 3:
```
cd frontend/
npm i
npm run dev
```
frontend will be running on localhost:3000# Frontend url
#### login page
```
localhost:3000/
```
#### dahboard (will show user list with details if user is logged in or only username as list)
```
localhost:3000/dashboard
```# API Endpoints Documentation
Welcome to our API documentation. Below you'll find details about various endpoints available in our API along with example POST requests and their corresponding request bodies.
### Description:
Creates a new user in the system.### SignUp (POST):
http://localhost:4000/api/auth/signup
### Request Body:
```json
{
"userName": "ab1",
"email": "[email protected]",
"password": "12345678"
}```
### SignIn (POST):
http://localhost:4000/api/auth/signin
### Request Body:
```json
{
"email": "[email protected]",
"password": "12345678"
}
```### Logged In User info/profile (GET)
http://localhost:4000/api/user/user### All user with view count (GET)
http://localhost:4000/api/user/all### View a User's profile (GET)
### Description:
This will increase view count and will send updated count of this profile.http://localhost:4000/api/user/user/1