karbon14 / crowdsale-home-api

Karbon14 Home API https://api.karbon14.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Karbon14 Home API

travis codecov

This API exposes the following services:

  • Download a file.
  • Subscribe users in a list of mailchimp.
  • Users can send a message of support.

Index

  1. Requirements
  2. Installation
  3. Routes
  4. Running the tests
  5. Built With
  6. Team
  7. License

Requirements

You have to install:

  • Docker
  • Docker-compose
  • Node ^9.11.1

Installation

The Karbon14 API is a basic API that you can use. Yes! It sounds good, does not it? How is this? The Karbon14 API use environment variables. With a minimal setup configuration you will be able to easily setup this API to fit your needs too.

First step

You need to clone the repository

git clone git@github.com:karbon14/home-api.git

Second step

Now, you need to install packages. Run in the console:

npm run install

Third step

The project needs you to declare your environment variables in the .env file. We leave an example with which you can guide yourself in root .env.example If you don't declare the environment variables and you run the api, you will notice a warning message in the terminal with the missing variables create.

Create file .env in root, and use the file .env.example as example

Fourth step

You are ready to run the project. You can run:

npm run start

or

npm run start:dev

Routes

POST /contact
POST /subscribe
GET /whitepaper

Running the tests

To run the unit test you can do

npm run test:unit

To run the e2e test you can do. Notice: remember start api before the e2e test

npm run test:e2e

To run both, unit and e2e tests, you can do

npm run test

Built With

  • Koa
  • Babel
  • Eslint
  • Jest (For testing)
  • Joi
  • Nodemailer
  • Mailchimp

Team

Natanael Zalazar | Jose Luis Casella | Walter Zalazar | |---|---|---| Natanael Zalazar | Jose Luis Casella | Walter Zalazar | :octocat:@zalazarnatanael | :octocat:@visionk14 | :octocat:@wzalazar |

License

MIT

About

Karbon14 Home API https://api.karbon14.org

License:MIT License


Languages

Language:JavaScript 82.5%Language:Makefile 16.3%Language:Dockerfile 0.6%Language:Shell 0.6%