Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cypher-o/todo-server-side
https://github.com/cypher-o/todo-server-side
Last synced: 24 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/cypher-o/todo-server-side
- Owner: Cypher-O
- License: mit
- Created: 2024-08-25T00:02:27.000Z (4 months ago)
- Default Branch: master
- Last Pushed: 2024-08-26T00:09:24.000Z (4 months ago)
- Last Synced: 2024-08-26T01:49:39.271Z (4 months ago)
- Language: JavaScript
- Size: 50.8 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# About Todo API
This project is a RESTful API built with Node.js, Express, and PostgreSQL, utilizing Neon for database management. It provides functionalities for user authentication and task management, including user registration, login, and CRUD operations for tasks.
## API Documentation
Explore the full API documentation using Swagger UI:
[Todo API Documentation](https://todo-server-side-0wob.onrender.com/api-docs)## Features
- **User Management**: Create and authenticate users, handle user registration, and log in.
- **Task Management**: Create, read, update, and delete tasks for authenticated users.
- **API Documentation**: Swagger UI for easy API exploration and testing.## API Endpoints
### Authentication Endpoints
- **POST /auth/register**
- Register a new user.
- Returns a token upon successful registration.- **POST /auth/login**
- Log in with credentials.
- Returns a token upon successful login.### Task Endpoints
- **GET /tasks**
- Fetch all tasks for the authenticated user.- **POST /tasks**
- Create a new task for the authenticated user.- **GET /tasks/:id**
- Fetch a specific task by ID.- **PUT /tasks/:id**
- Update a specific task by ID.- **DELETE /tasks/:id**
- Delete a specific task by ID.## Installation
1. Clone the repository:
```sh
git clone https://github.com/Cypher-O/todo-server-side.git
cd todo-server-side
```## Set Up Environment Variables
- Create a `.env` file in the root directory and add the following variables:
```env
NODE_ENV=your_node_environment
PORT=your_port
JWT_SECRET=your_jwt_secret
DB_CONNECTION_STRING=your_database_connection_string
```## Usage
- To run the application, use the following commands from the project directory:
```sh
npm run build
npm run dev
```## Contributing
- Contributions are welcome! Please read [CONTRIBUTING.md](CONTRIBUTING.md) for details on our code of conduct and the process for submitting pull requests.
## License
- This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.