This is a backend API which facilitates an instant messenger. It utilizes ejs to render web pages, Socket.io to provide live updates, and Express as the node.js framework.
Visit Live App
Table of Contents
There are three roles for this application: user, channel admin, DB admin.
- User - This is any user that has only registred and do not have any of their own channels. They have the ability to join channels that they have access to.
- Channel Admin - This is a user who has created a channel. Once they've created a channel, they can delete it at any point in time.
- DB Admin - This is a user who has access to the DB. Once logged into the DB, they can update an account to admin by changing a field. This admin can delete any channel, regardless of whether or not they created it. In additoin to this, a channel created by this role will include all of the current users of the application. Allowing any user to join this channel.
- Node.js
- Express
- MongoDB
- Render
- Socket.io
In order to run this project locally, you will need to clone the repo, install dependencies, and create and create a .env file.
Npm will be required.
- npm
npm install npm@latest -g
- Clone the repo
git clone https://github.com/colecody27/instant-messenger.git
- Install NPM packages
npm install
- Create .env file in root directory with these variables. Set values as desired.
.env
DB_URL='' SALT='' PORT=''
Run localhost
npm run start
When attempting to message in a channel from multiple users on the same localhost. It may be necessary to create a browser instance and run in incognito mode in order to avoid cookie conflict.
Cody Cole - Linkedin: https://linkedin.com/in/cody-cole/