Realtime chat web application example made with the MEVN stack (MongoDB, ExpressJS, VueJS, and NodeJS).
- Clone the repository:
cd somewhere
git clone https://github.com/practical-works/mevn-chat.git
cd mevn-chat
- Install the dependencies:
npm i
- Install Nodemon globally:
npm i -g nodemon`
- Run development database:
npm run db
- Run development server:
npm run server
-
Create and run a live MongoDB database using a service like MongoDB Atlas and get the connection string.
The MongoDB connection string (URL) usually looks something like this:
mongodb+srv://username:password@host-address/database-name?retryWrites=true&w=majority where username, password, host-address, and database-name are placeholders for the values provided by the service and specific to the user.
-
Push the repository to a node server using a service like Heroku.
-
In the remote node server:
a. Set the environment variable
CONNECTION_STRING
to the obtained mongoDB connection string:CONNECTION_STRING=mongodb+srv://...etc
b. Install the dependencies:
npm i
c. Start the server for production:
npm start
- Runtime: NodeJS
- Package Manager: NPM
- Editor: Sublime Text
- βοΈ Core:
- π½ Database:
- π§ Utils:
Licensed under MIT.