Skip to content

Dev-Yan/Pharma

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

11 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

title description tags
ExpressJS Mongoose
An ExpressJS server that connects to a MongoDB database
express
mongodb
mongoose
typescript

ExpressJS Mongoose Example

This example starts an ExpressJS server that connects to a Railway MongoDB database using MongooseJS

Deploy on Railway

โœจ Features

  • Express
  • TypeScript
  • MongoDB with Mongoose

๐Ÿ’โ€โ™€๏ธ How to use

  • Install dependencies yarn
  • Connect to your Railway project railway link
  • Start the development server railway run yarn dev

๐Ÿ“ Notes

The starter contains a single Country model that you can read from and write to.

There are two main routes on the server:

  • A GET route - /countries which returns all the countries
  • A POST route - /countries which can be used to add a new country

Example post request to add a new country:

curl -H "Content-Type: application/json" \
  --request POST \
  -d '{"name":"India","iso2code":"IN"}' \
  http://localhost:3333/countries

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •