Code Monkey home page Code Monkey logo

cs-4783-adv-se's Introduction

CS4783-DevOps

Howdy, here's how you can run my Node + Express build locally.

Running Locally

Please follow the steps from top to bottom.

docker-compose up --build
docker-compose down
DROP DATABASE IF EXISTS property;
CREATE DATABASE IF NOT EXISTS property;
USE property;

DROP TABLE IF EXISTS properties;

CREATE TABLE IF NOT EXISTS `properties` (
    id int(11) NOT NULL PRIMARY KEY AUTO_INCREMENT,
    address varchar(255) NOT NULL,
    city varchar(255) NOT NULL,
    state varchar(255) NOT NULL,
    zip varchar(255) NOT NULL
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8;

To start the server, run

yarn start:dev

To run Mocha tests, run

yarn test:dev

Open a browser and attempt to access https://localhost:12005

Progress

A security schema has been added to swagger.json, POST /properties, DELETE /properties/{id}, and PUT /properties/{id} are access-restricted with an API key you must update in .env. Yarn has been added to help streamline the testing.

Endpoints

The endpoints in homework 1 are /hello and /swagger.json, these are accessible by adding the / to the end of the URL localhost:8080.

The endpoints in homework 2 are /properties/ and any /properties/{id} wildcard related requests.

API Key validation in homework 3 has been added, you will need to put your API key into the .env folder. Mocha tests have been implemented with chai and will work for now, but will require ID updates depending on if the DB+Table is fresh

Example:

Input:

{
  "address": "string",
  "city": "string",
  "state": "string",
  "zip": "T"
}

Output:

[
  {
    "message": "state length must be less than or equal to 2 characters long"
  },
  {
    "message": "zip length must be at least 5 characters long"
  }
]

cs-4783-adv-se's People

Contributors

aronperez avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.