Skip to content

wandrr-lodge/property-information

Repository files navigation

HostileWorld Property Info Component

Contains a fullstack React module with components for displaying a hostel's description, a map of it's location, and the hostel's specific rules and policies.

Related Projects

Table of Contents

  1. Requirements
  2. Development
  3. API

Requirements

An nvmrc file is included if using nvm.

Development

Before you start, you have to chage the properties (host, user, database, password) of the object being passed to mysql.createConnection in server/database/database.js file.

To run the dev client:

  • npm run build-dev

To run the dev server:

  • npm run start-dev

To seed the database:

  • npm run seed

Installing Dependencies

You must have access to the running instance of mysql server.

From within the root directory:

npm install

API

All GET, PUT, and DELETE endpoints define the "id" (e.g. "/api/house/:id/hostel" -> "/api/house/100/hostel") parameter that references the respective record on which the operation is being performed.

All POST and PUT endpoints expect json formated payload that defines the values of the record to be created or updated, respectively.

All GET, POST, and PUT endpoints return json formated record that was requested, created, or updated, respectively.

Examples of the requests/responses can be found at this gist.

Hostel

The following are the endpoints for operating on the hostel table records:

  • POST /api/house/hostel
  • GET /api/house/:id/hostel
  • PUT /api/house/:id/hostel
  • DELETE /api/house/:id/hostel

Description

The following are the endpoints for operating on the description table records:

  • POST /api/house/description
  • GET /api/house/:id/description
  • PUT /api/house/:id/description
  • DELETE /api/house/:id/description

Address

The following are the endpoints for operating on the address table records:

  • POST /api/house/address
  • GET /api/house/:id/address
  • PUT /api/house/:id/address
  • DELETE /api/house/:id/address

Rules

The following are the endpoints for operating on the rules table records:

  • POST /api/house/rules
  • GET /api/house/:id/rules
  • PUT /api/house/:id/rules
  • DELETE /api/house/:id/rules

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •