Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/andresilveira1/rocketnotes-api
A Rest API build with Node.js.
https://github.com/andresilveira1/rocketnotes-api
cors dotenv express jsonwebtoken knex nodejs sqlite sqlite3
Last synced: about 1 month ago
JSON representation
A Rest API build with Node.js.
- Host: GitHub
- URL: https://github.com/andresilveira1/rocketnotes-api
- Owner: andresilveira1
- Created: 2023-06-06T23:35:28.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-03-13T00:00:22.000Z (10 months ago)
- Last Synced: 2024-11-20T05:11:18.740Z (about 1 month ago)
- Topics: cors, dotenv, express, jsonwebtoken, knex, nodejs, sqlite, sqlite3
- Language: JavaScript
- Homepage:
- Size: 569 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
RocketNotes Backend
A Rest API build with Node.js and Express. On this API you can create a account and have a place to save your personal notes.
### FronEnd repository: [Link](https://github.com/andresilveira1/rocketnotes-web)
## Technologies
- Node.js
- Express
- SQLite
- Knex
- Cors
- JWT## Requisites
- [Node.js](https://nodejs.org/en)
## Setup
- Clone the repository;
- Install dependencies (`npm install`)
- Run application (`npm run dev`)
#
HTTP
##
User
### POST`/users`
Create a new user.
#### Request body
```json
{
"name": "username",
"email": "[email protected]",
"password": "123456"
}
```### PUT`/users`
Update user. ID will be taken from token via request.
#### Request body
```json
{
"name": "username",
"email": "[email protected]",
"old_password": "123456",
"password": "123"
}
```### PATCH`/users/avatar`
Upload or Update avatar. ID will be taken from token via request. Avatar filename will be taken from request and saved on database.
#### Authentication: `/sessions`
```json
{
"email": "[email protected]",
"password": "123456"
}
```##
Notes
### POST`/notes`
Create a note. User ID will be taken from token via request.
```json
{
"title": "Introduction to Nodejs",
"description": "This is a example.",
"tags": ["node", "express"],
"links": ["link1", "link2"]
}
```### GET`/notes?`
Get a note by title or tag. User ID will be taken from token via request.
```http
user_id=1&title=xxx&tags=xxx
```### GET`/notes/:id`
Show all notes. User ID will be taken from token via reuqest.
### DELETE`/notes/:id`
Delete a note. User ID will be taken from token via request.
##
Tags
### GET`/tags`
List all tags. User ID will be taken from token via request to get all tags.
[![MIT License](https://img.shields.io/badge/License-MIT-green.svg)](https://choosealicense.com/licenses/mit/)