This is a simple backend API for a TODO app using Koa.js, j2s, Bookshelf.js, and Knex.js. It provides CRUD operations on a todos table in the database.
Getting Started
These instructions will help you set up and run the project on your local machine.
Prerequisites
Make sure you have Node.js and npm installed on your machine. You also need a PostgreSQL database set up with a todos table containing the following columns: id, title, description, completed, created_at, and updated_at.
Installation
Clone the repository:
git clone https://github.com/yourusername/todo-app-backend.git
cd todo-app-backend
Install the dependencies:
npm install
Update the database configuration in knexfile.js with your database details:
TODO App Backend API
This is a simple backend API for a TODO app using Koa.js, j2s, Bookshelf.js, and Knex.js. It provides CRUD operations on a todos table in the database.
Getting Started
These instructions will help you set up and run the project on your local machine.
Prerequisites
Make sure you have Node.js and npm installed on your machine. You also need a PostgreSQL database set up with a todos table containing the following columns:
id
,title
,description
,completed
,created_at
, andupdated_at
.Installation
The server will start running on port 3000, or the port specified in your environment variables.
API Endpoints
The following API endpoints are available:
GET /api/todos
: Retrieve a list of all todos.GET /api/todos/:id
: Retrieve a specific todo by its ID.POST /api/todos
: Create a new todo.PUT /api/todos/:id
: Update a specific todo by its ID.DELETE /api/todos/:id
: Delete a specific todo by its ID.Built With
License
This project is licensed under the MIT License - see the LICENSE file for details.