Skip to content

navjit72/node-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Buildings API

About

This is a basic CRUD application that reads and writes information about Buildings, and Thermostats to a sql database.

We are using an in-memory sqlite instance, which is seeded on application start. Restarting the application will reseed the database.

Tools

Node (version), sqlite, sqlite3

Set up

Might into install the dependencies: ie. npm install express

Commands

  • npm run start: Starts the application

If the server runs successfully, you should see the following message: Server running at http://localhost:3000

Sample API Calls

List Buildings

curl -X GET http://localhost:3000/buildings

Create a Building

curl -X POST http://localhost:3000/buildings --json '{
  "name": "Building 1",
  "address": "123 Main St"
}'

Delete a Building By ID

curl -X DELETE http://localhost:3000/buildings/1

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors