SMS Manager is an application built using Node, Express and MongoDB that enables users send and receive SMS
- User can send SMS
- User can receive SMS
- Deleting a user deletes all reference to messages they sent or received
- NodeJS
- ExpressJS
- MongoDB
- Mongoose
- Before cloning the repo, make sure you have Node installed on your local machine
- Clone the repo to your local machine
> $ git clone https://github.com/billmike/smsmanager.git
- Change directory into the more-recipes directory
> $ cd smsmanager
- Install all required dependencies by running
> $ npm install
-
Once installation is done, create a
.env
file and fill it with the neccessary environment variables (see.env.example
for the neccessary environment variables required) -
Create a database to be used with the application
-
To start the application, run
> $ npm start
-
POST
localhost:8080/contact/create
- To create a user, hit this endpoint via postman and supply the
firstName
,lastName
, andphoneNumber
properties to the request body
- To create a user, hit this endpoint via postman and supply the
-
DELETE
localhost:8080/contact/:userId
- To delete a user from the application, supply the userId of the user as a params to the route.
NOTE: Deleting a user removes all messages they've sent or received in the application
-
POST
localhost:8080/message/send-msg
- To send a message, hit this endpoint via postman and supply the
message
,senderContact
andreceiverContact
as properties to the request body
- To send a message, hit this endpoint via postman and supply the
-
GET
localhost:8080/message/sent-sms/:userId
- Enter the url above to get the messages sent by a particular user in the application. Provide the userId as a params to the URL
-
GET
localhost:8080/message/receive/:userId
- Enter the url above to get the messages received by a particular user in the application. Provide the userId as a params to the URL