✂️ Cut The Link MERN Application with JWT authentication (using MongoDB, Express, React and Node.js)
0️⃣ If you don't have installed NodeJS and NPM on your PC run this command:
sudo apt install nodejs
sudo apt install npm
or downlad it by using this link: https://nodejs.org/en/download/
1️⃣ Install all node_modules
npm i
2️⃣ Change the proxy in client/package.json
:
From:
"proxy": {
"/*": {
"target": "http://localhost:5000"
},
"/detail/*": {
"target": "http://localhost:5000"
},
"/create/*": {
"target": "http://localhost:5000"
}
}
To:
"proxy": "http://localhost:5000",
3️⃣ In config/
create development.js
4️⃣ In development.js
add this:
module.exports = {
port: 5000,
jwtSecret: "<random string>", // j938jd3kx9034jd93k
mongoUri: "" //config got from MongoDB
baseUrl: "http://localhost:5000"
};
5️⃣ Run the app locally:
npm run dev
6️⃣ Enjoy 😉
- If you don't see directories
node_modules
after downloading it, or you have some other problems, try to disableWindows Defender
, download directory again and repeat steps
https://cut-link-app.herokuapp.com/
Feel free to contact with me. And hope you enjoy this useful web app 😎