Fullstack JavaScript Application (MEVN-MongoDB-Express-Vuejs-Nodejs)
- Nodejs >= v10.19
- npm >= 6.14.11
- yarn >= 1.22.5
- @vue/cli >= 4.4.6
- internet access
#How to run application
clone repository
git clone https://github.com/Surajmendy/fullStack-mevn-app.git
change directory to fullStack-mevn-app folder
cd fullStack-mevn-app
I have created a mongodb Atlas database and have whitelisted all ip addresses in order to make it easy to run the application.
To change the database, navigate to the backend directory and open config.js
change url to your mongodb database url.
Note**
If you start the backend and you see the message "Connected to the database!" on the console, it means, the application was able to establish connection to the mongodb atlas database, Hence you are good to start testing.
Incase you see the message "Cannot connect to the database!", kindly make sure you are connected to the internet. Sometimes, atlas reject some IP address, although I have whitelisted all IPs, In this case, kindly email me on [email protected] to whitelist your IP address or connect to a local monogodb database by changing the url in the config.js
- navigate to backend directory
cd backend
install packages
npm install
-start backend application
npm start
Backend runs on port 3001,
open http://127.0.0.1:3001 in your browser to test if backend started sucessfully
if you see {"message":"Works."} it means the backend application started successfully
open http://127.0.0.1:3001/api/docs to read API documentation
- navigate to frontend directory
open new terminal in cloned repo directory
change directory to frontend directory
cd frontend
install packages
yarn install
-start frontend application
yarn serve
Frontend runs on port 8080, open frontend in your browser with http://127.0.0.1:8080
open config.js file in fullStack-mevn-app/frontend/public
change apiUrl
to your backend url
if the backend url is http://127.0.0.1:3001
then apiUrl = "http://127.0.0.1:3001/api"