Giter Site home page Giter Site logo

winter-breeze's Introduction

Winter-Breeze

backend JSON API with Node.js and PostgreSQL

Avaiable Endpoints

/topActiveUsers?page={pageNumber} Returns user info, count of applications in the last week and the names of the 3 latest applied listings. All the users should be listed and ordered by total activity.

/users?id={user.id} Returns user information at a given user id

Things to keep in mind to run with Node runtime

  1. Make sure to have postgres install
  2. create postgres database
  3. create .env file and include necessary database information
  4. Run the following commands to populate db
psql winter-breeze < structure.sql
psql winter-breeze < data.sql
  1. npm install
  2. npm run start for production
  3. npm run start:dev for development

Things to keep in mind to run with Docker

  1. Create docker-compose.yml. See docker-compose.yml.example for reference
  2. Node app image will be created when postgres db is running
  3. Check information in Dockerfile

Time take on completing the exercise

Estimated time 7-9hr Actual time 12hr

  • 0.5hr Understanding of requirements
  • 1.5hr getting familiar with Docker usage
  • 1.0hr Setting up Node.js and Express.js app
  • 2.5hr /topActiveUsers view SQL
  • 2.5hr /users view SQL
  • 2.0hr testing endpoints and adjust HTTP responses
  • 1.5hr experiencing difficulties with Docker ran locally on Windows OS
  • 0.5hr documentation

winter-breeze's People

Contributors

cbchien 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.