Git Product home page Git Product logo

code_challenge's Introduction

GitHub Workflow Status (branch) Coverage Status GitHub tag (latest by date) CI docker hub

INTRODUCTION

This project consists in a NodeJs application that gets business and reviews from Yelp Fusion APIs. It was developed in Typescript and has the following endpoints:


  • GET /api/business
  • GET /api/business/reviews

Run in Insomnia}

STRUCTURE

At this version, the project contains the follow structure

.
├── api_request.json
├── docker
│   └── docker-compose.yml
├── Dockerfile
├── jest.config.js
├── k8s
│   ├── deployment.yaml
│   └── service.yaml
├── nodemon.json
├── package.json
├── package-lock.json
├── prettier.config.js
├── README.md
├── src
│   ├── app.ts
│   ├── config
│   │   └── messages.ts
│   ├── controllers
│   │   ├── business.controller.ts
│   │   └── business-reviews.controller.ts
│   ├── interface
│   │   ├── controllers
│   │   │   ├── business.interface.ts
│   │   │   ├── business-review.interface.ts
│   │   │   └── review.interface.ts
│   │   └── services
│   │       ├── yelp-business.interface.ts
│   │       ├── yelp-location.interface.ts
│   │       ├── yelp-review.interface.ts
│   │       └── yelp-user.interface.ts
│   ├── middlewares
│   │   ├── loggerMiddleware.ts
│   │   └── validators
│   │       └── headers.ts
│   ├── routes.ts
│   ├── server.ts
│   └── services
│       ├── api.ts
│       ├── business-reviews-service.ts
│       ├── business-service.ts
│       ├── yelp-business-service.ts
│       └── yelp-review-service.ts
├── __tests__
│   ├── middlewares
│   │   ├── loggerMiddleware.test.ts
│   │   └── validators
│   │       └── headers.test.ts
│   └── services
│       ├── business-reviews-service.test.ts
│       ├── business-service.test.ts
│       ├── yelp-business-service.test.ts
│       └── yelp-review-service.test.ts
├── tsconfig.json
└── tslint.json

RUNNING

  • Notice that you must have your own Yelp API Key to access the apis successfully

And there's two ways to execute this project using containers.

  • Via docker-compose
    • #!/bin/bash 
      $ docker-compose -f docker/docker-compose.yml up -d
  • Via Kubernetes Cluster
    • #!/bin/bash 
      $ kubectl apply -f k8s/deployment.yaml
      $ kubectl apply -f k8s/service.yaml
  • Or, to run this project in local mode, plase try as follows:
    • #!/bin/bash 
      $ npm i
      $ npm run dev

TESTING

To run tests, do the follows

  • #!/bin/bash 
    # if you didn't installed the libs, please run 
    $ npm i
    # then
    $ npm run test

code_challenge's People

Contributors

iborba avatar dependabot[bot] avatar

Stargazers

Jefferson Follmann avatar

Watchers

James Cloos avatar  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.