This is the URL Shortner service build using MERN Stack
🏠 Homepage
-
npm >=5.5.0
-
node >=9.3.0
Install both client and server dependencies
# Install dependencies for server
$ npm install
# Install dependencies for client
$ npm run client-install
1. Create a nodemon.json file in project root dir
$ touch nodemon.json
2. Feed values to the file like this -
{
"env": {
"mongoURI": "",
"baseUrl": "http://localhost:5000",
"NODE_ENV": "development"
}
}
ℹ️ To get the mongoURI, you can install MongoDB locally , use MongoDB Atlas or simply use MLab.
# Run the client & server with concurrently
$ npm run dev
# Run the Express server only
$ npm run server
# Run the React client only
$ npm run client
# Server runs on http://localhost:5000 and client on http://localhost:3000
There is a Heroku post build script so that you do not have to compile your React frontend manually, it is done on the server. Simply push to Heroku and it will build and load the client index.html page
👤 Soham Mondal
-
Twitter: @soham_sm_mondal
-
Github: @sohammondal
-
LinkedIn: Soham Mondal
-
Website: sohammondal.com
Contributions, issues and feature requests are welcome!
Feel free to check issues page.
Give a ⭐️ if this project helped you!
Copyright © 2019 Soham Mondal.
This project is ISC licensed.