This is a Travel Map pinning web app developed using Node.js, MongoDB, React.js and Mapbox. In this application, a user can pin any location and share reviews with other users across the world.
-
Clone the repository or download the zip folder which contains two folders named backend and frontend.
-
Cd to backend folder and install the following dependencies: -> npm init -> yarn add express -> yarn add mongoose -> yarn add nodemon -> yarn add dotenv -> yarn add bcrypt
-
Add a new file in backend folder as ".env" and add the "MONGO_URL" of your mongodb. -> MONGO_URL = "your mongo url token"
-
In package.json (inside backend folder), under scripts tag, add: -> "start": "nodemon index.js"
-
To start backend server: -> yarn start
-
Now open another terminal and cd to frontend to create a react application. -> npx create-react-app . (full stop at end means the directory)
-
Install following dependencies: -> yarn add react-map-gl -> yarn add @material-ui/core @material-ui/icons -> yarn add axios -> yarn add timeago.js
-
Add a new file in frontend as ".env" and add your Mapbox token: -> REACT_APP_MAPBOX = "your Mapbox token"
-
In package.json (inside the frontend directory), add proxy at the last: -> "proxy": "http://localhost:8800/api"
-
To run the application: -> yarn start
-
Enjoy!