Karbon14 Home API
This API exposes the following services:
- Download a file.
- Subscribe users in a list of mailchimp.
- Users can send a message of support.
Index
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 | @zalazarnatanael | @visionk14 | @wzalazar |