Skip to content

rpt26-sdc-singleton/shane-service-about

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Service - About

Coursera About Service Contains a description of the course, along with some strategic goals and possible outcomes of taking the course.

View the sample on Coursera under "About this Course"

Related Projects

Table of Contents

  1. Usage
  2. Requirements
  3. Development
  4. API
  5. Deployment

Usage

From within the db directory, run seedRunner.js to seed the database and wait for it to complete. Run npm build to build the webpack bundle Run npm server-dev to start the server. Server runs on port 3002.

Requirements

An nvmrc file is included if using nvm.

  • Node 6.13.0
  • etc

Development

Installing Dependencies

From within the root directory:

npm install -g webpack
npm install

API Routes

GET /api/about/:id

POST /api/about/:id

  • Creates a new listing that takes no input on the body
  • returns a 201 if successful

PUT /api/about/:id

  • Accepts fields in the request body to mutate the listing at requested id
  • returns a 200 status code on success

DELETE /api/about/:id

  • returns a 200 status code on successful deletion

Deployment

Database

To setup Postgres on Docker:

  • Target machine must have docker-compose installed
  • Deploy docker-compose.yml and schema.sql to the server
  • Change the password in schema.sql and docker-compose.yml to something secure and in sync

To seed:

Requirements: Go 1.14+

  • build the data-gen.go via go build -o seed
  • PG_URL=postgres://<username>:<password>@<host>:<port>/<database-name>

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 75.5%
  • Go 13.3%
  • CSS 7.0%
  • Shell 2.3%
  • HTML 1.3%
  • Dockerfile 0.6%