Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sarwar-asik/all-mongo
https://github.com/sarwar-asik/all-mongo
Last synced: 1 day ago
JSON representation
- Host: GitHub
- URL: https://github.com/sarwar-asik/all-mongo
- Owner: sarwar-asik
- Created: 2023-07-26T05:53:53.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-07-26T06:56:10.000Z (over 1 year ago)
- Last Synced: 2023-07-26T07:50:19.609Z (over 1 year ago)
- Language: TypeScript
- Size: 4.16 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Ready Server :::::
## Ready with esliint ,logger ,global errorhandle , uncaught error,Zod
\*\* just clone the server for >>>>
### Features of src>app>modules>AUTH> :::
** User Login
** User Signup
\*\* Get refresh token### Features of src>app>modules>USER(by admin ) :::
** create user
** user profile (any user)
** update profile (any user)
** update user (admin)
** allUser (admin)
** delete user (admin)
\*\* get single user (admin )### .env (sample just )
DB_URL='mongodb+sdfasdfawrfqawe1ertwer5454634534352345'
NODE_ENV= development
PORT = 5000JWT_SECRET = 'type_secret'
JWT_EXPIRES_IN=1d
JWT_REFRESH_SECRET='very-refresh-secret'
JWT_REFRESH_EXPIRES_IN=365d## Vercel hosting the server
### Vercel এ ডেপ্লয় এর ক্ষেত্রে কয়েকটি জিনিস খেয়ালরাখতে হবে Sits config.jso ("./dist" is very important)
"module": "commonjs" / Specify what module code is generated. */*,
"rootDir": "./src" / Specify the root folder
within your source files. /*, "outDir": "./dist" */ Specify an output folder
for all emitted files. */*,
### এই কনফিগটি add করে নিতে হবে যদি আগে থেকে করা না থাকে
### ২। package.json এর মধ্যে
"scripts": {
"dev": "ts-node-dev --respawn --transpile-only src/server.ts",
"start": "node dist/server.js",
"build": "tsc"
}### ৩। প্রজেক্টের রুট এর মধ্যে vercel.json ফাইল বানিইয়ে নিতে হবে
{
"version": 2,
"builds": [
{
"src": "dist/server.js",
"use": "@vercel/node"
}
],
"routes": [
{
"src": "/(.*)",
"dest": "dist/server.js"
}
]
}### এরপর Cli দিয়ে deploy করে নিলেই কাজ শেষ
tsc
vercel
vercel --prod