Giter VIP home page Giter VIP logo

certifoundation's Introduction

💪 Challenge CertiFoundation

Challenger of Certi Foundation

🏁 Getting Started

Description!

Na linguagem de sua preferência, crie um servidor HTTP que, para cada requisição GET, retorne um JSON cuja chave extenso seja a versão por extenso do número inteiro enviado no path. Os números podem estar no intervalo [-99999, 99999].

Exemplos:

λ curl http://localhost:3000/1
{ "extenso": "um" }

λ curl http://localhost:3000/-1042
{ "extenso": "menos mil e quarenta e dois" }

λ curl http://localhost:3000/94587
{ "extenso": "noventa e quatro mil e quinhentos e oitenta e sete" }

Prerequisites

Firstly, you will need to install:

Installing

A step by step that will guide you on how to run the project on your computer.

Clone the project repository:

> git clone https://github.com/costadiogo/CertiFoundation

Go to the project directory:

> cd CertiFoundation

Start without Docker

In your terminal type:

> yarn install

This command will install the dependencies and create the node_modules folder

After installing the dependencies we will start the server

In your terminal type:

> yarn start

This command will start the http server.

If everything has worked out so far in your terminal the following command will appear:

   Test Main route from API
     Test GET route 
       ✓ Should return an message home route
 
   Test GET route for return a number in full 
     Test GET/:id route
      ✓ Should return a number in full


> Server started at http://localhost:3000

Testing the application

Then open your browser and in the url type:

http://localhost:3000/1

Your return should be:

{ "extenso": "um" }

Start with Docker

In your terminal type:

> docker-compose up

This command will install the dependencies, run the tests and boot the server

If everything has worked out so far in your terminal the following command will appear:

Starting certifoundation_app_1 ... done
Attaching to certifoundation_app_1
app_1  | yarn run v1.22.5
app_1  | $ mocha --timeout 10000 && node server.js
app_1  | 
app_1  | 
app_1  |   Test Main route from API
app_1  |     Test GET route 
app_1  |       ✓ Should return an message home route
app_1  | 
app_1  |   Test GET route for return a number in full 
app_1  |     Test GET/:id route
app_1  |       ✓ Should return a number in full
app_1  | 
app_1  | 
app_1  |   2 passing (34ms)
app_1  | 
app_1  | Server started at http://localhost:3000

Testing the application

Then open your browser and in the url type:

http://localhost:3000/1

Your return should be:

{ "extenso": "um" }

🔨Built With

🙌 Author

📃License

This project is licensed under the MIT License - see the LICENSE.md file for details

certifoundation's People

Contributors

costadiogo avatar

Stargazers

Manoel Junior 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.