Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/eriveltondasilva/koa-app

Projeto de uma simples api utilizando o framework nodejs koa.js que exibe uma lista de tasks de um arquivo json
https://github.com/eriveltondasilva/koa-app

backend koa-router koajs nodejs

Last synced: 28 days ago
JSON representation

Projeto de uma simples api utilizando o framework nodejs koa.js que exibe uma lista de tasks de um arquivo json

Awesome Lists containing this project

README

        

# Simple Tasks API

This is a simple API built with Node.js and Koa.js that returns a list of tasks. This project is intended for educational purposes, demonstrating how to set up a basic API using Koa.js.

## Table of Contents

- [Installation](#installation)
- [Usage](#usage)
- [API Endpoints](#api-endpoints)
- [Contributing](#contributing)
- [License](#license)

## Installation

1. Clone the repository:
```bash
git clone https://github.com/eriveltondasilva/koa-app.git
```
2. Change to the project directory:
```bash
cd koa-app
```
3. Install the dependencies:
```bash
npm install
```

## Usage

1. Start the server:
```bash
npm start
```
2. The server will start on `http://localhost:3000`.

## API Endpoints

### Get Tasks

- **URL:** `/tasks`
- **Method:** `GET`
- **Response:**
```json
[
{
"id": 1,
"title": "Buy groceries",
"completed": false
},
{
"id": 2,
"title": "Walk the dog",
"completed": true
},
{
"id": 3,
"title": "Read a book",
"completed": false
}
]
```

## Contributing

1. Fork the repository
2. Create a new branch (`git checkout -b feature-branch`)
3. Commit your changes (`git commit -m 'Add some feature'`)
4. Push to the branch (`git push origin feature-branch`)
5. Open a pull request

## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.