Skip to content

criticalPathway/spkit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ContactNote

Requirements:

node => v18.18.0 npm => 9.8.1 npx => 9.8.1

Steps:

Clone the repo:

- git clone git@github.com:alexaslamgm/ContactNote.git

Run the TypeScript compiler to compile the TypeScript code into JavaScript:

- npx tsc

Run the server:

- node dist/app.js

Application routes:

You will need Postman for api testing.

POST: localhost:3000/contact
BODY: {
    "name": "Michael Levit",
    "email": "michaellevit@gmail.com",
    "message": "hi there, how are you doing today?"
}

Response: {
    "name": "Michael Levit",
    "email": "michaellevit@gmail.com",
    "message": "hi there, how are you doing today?",
    "_id": "65cf62da5419e0f8b03bc969",
    "__v": 0
}
GET: localhost:3000/contacts
Reponse: [{"_id":"65cf488a4f2f5f023832c9f3","name":"Alex Aslam","email":"alexaslam02@gmail.com","message":"hi there, how are you doing today?","__v":0},{"_id":"65cf48a54f2f5f023832c9f6","name":"Michael Levit","email":"michaellevit@gmail.com","message":"hi there, how are you doing today?","__v":0}]

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published