An app that helps you to keep track of your day-to-day tasks.
- POST /api/auth/signup: Create an account
- POST /api/auth/login: Log into your account
- POST /api/todos/: Create a new task
- DELETE /api/todos/: Delete all tasks
- GET /todos/:todoId: Get a single task
- GET /api/todos: Get all tasks
- GET /api/todos?s='search_query': Search through tasks
- GET /api/todos?exp: Download tasks to a csv file
- PATCH /todos/completed Update all tasks' completed statuses
- PATCH /todos/:todoId: Update a task
- DELETE /todos/:todoId: Delete a task
- GET /api/logs/:key: Download logs
- GET /api/docs Documentation
Clone the repository from Github.
( You will need Git for this, Get it HERE )
git clone https://github.com/gitego-brian/Awesomity-Todo-App-Backend.git
- PostgreSQL installed
- Database
todoapp
created - Rename the
.env.example
file to.env
after filling in your custom variables
To Install all dependencies:
npm install
To run the tests:
npm test
To run the app:
npm run dev
-
Install Docker from HERE, then check if you have docker-compose installed by running
docker-compose -v
in the terminal, if that doesn't print out its version, first install it from HERE. -
After cloning the application from Github. Switch to the main app where there's the Dockerfile and the docker-compose.yml file
-
Create a .env file and copy .env.example and fill out all the variables with your own.
-
If you have postgres installed on your computer, stop any server instance of it that may be running. Do this by running
sudo systemctl stop postgresql
if you are on a Linux OS. -
Run
docker-compose up
(Prefix this withsudo
if you are running a Linux OS). Make sure port5000
is not taken, if so customise the port in .env file by adding the PORT variable.
Test the endpoints on http://localhost:5000/api/docs or with your favorite API client, I strongly recommend Postman though 👌
{
"firstName": "Charles",
"lastName": "Rudahigwa",
"username": "crudahigwa",
"password": "Password"
}
{
"status": 201,
"message": "Signup successful"
}
- Server-Side Framework: Node/Express
- Testing framework: Mocha/Chai
- Database engine: Postgres
- ORM: Sequelize
- Continuous integration: Travis-Ci
- ES6 Transpiler: Babel
- Test coverage: nyc
- Maintainability: Code climate
- Container: Docker
- The API is hosted on Heroku at https://brian-todo-backend.herokuapp.com/
If you ever have an idea on how you might help improve the app, you are welcome to contribute your changes to the repository, Just follow the steps below:
Assumming you have the repo cloned on your PC,
- Pull the latest changes from the remote repo by running:
git pull origin develop
NB: You need to be on the develop branch when you do this
- Create & switch to the new branch where you will add your changes by running:
git checkout -b yournewbranchname
- After adding your changes, commit and push them to create a pull request against the develop branch. I will review and merge them if they are helpful.