REST API for a notes app where users can create, edit, archive and delete their notes.
| Endpoint | Description |
|---|---|
GET /categories |
Get all categories |
GET /notes/stats |
Get categories with aggregated statistics |
GET /notes |
Get all notes |
GET /notes/:id |
Get single note |
POST /notes |
Create note |
PATCH /notes/:id |
Edit note |
DELETE /notes/:id |
Delete note |
You must have Node.js installed on your computer.
# by SSH
git clone git@github.com:sashua/radency-notes-back.git
# or HTTPS
git clone https://github.com/sashua/radency-notes-back.gitcd radency-notes-back
npm installnpm run startBy default, the server starts listening on port 3000, you can configure your own port by setting the value SERVER_PORT in the .env file.
interface Category {
id: string;
name: string;
icon: string;
}
interface Statistics extends Category {
active: number;
archived: number;
}
interface Note {
id: string;
categoryId: string;
name: string;
content?: string;
archived?: string;
createdAt: string;
}
type CreateNoteDto = Pick<Note, 'categoryId' | 'name' | 'content'>;
type UpdateNoteDto = Partial<Omit<Note, 'id' | 'createdAt'>>;