Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rodrigoqueiroz12/next-calendar-api
https://github.com/rodrigoqueiroz12/next-calendar-api
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/rodrigoqueiroz12/next-calendar-api
- Owner: rodrigoqueiroz12
- Created: 2023-11-13T10:58:14.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-11-16T18:40:06.000Z (about 1 year ago)
- Last Synced: 2023-11-16T20:09:53.995Z (about 1 year ago)
- Language: TypeScript
- Size: 67.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Next.js Calendar API
The objective of this project is to provide a backend for the next-calendar
## Getting Started
This is an example of how you may give instructions on setting up your project locally.
To get a local copy up and running follow these simple example steps.### Installation
1. Clone the repo
```sh
git clone https://github.com/rodrigoqueiroz12/nextjs-calendar-api.git
```
2. Install the packages
```sh
npm install
// or
pnpm install
```
3. Run the knex migrations
```sh
npm run knex migrate:latest
// or
pnpm run knex migrate:latest
````
4. Copy the `.env.example` content and paste in a `.env` file
5. Run the project
```sh
npm run dev
// or
pnpm run dev
```### The frontend for this project
[Click here](https://github.com/rodrigoqueiroz12/next-calendar) to visit the frontend repository
## The API
### `/events`
#### `GET /events`
Return a list of all events
#### `POST /events`
Create an event
```json
{
"title": "New event test",
"description": "a new description",
"start": "2023-11-12T17:43:34.704Z",
"end": "2023-11-12T17:43:34.704Z"
}
```#### `PUT /events/:id`
Update an event
```json
{
"title": "New event test updated",
"description": "a new description updated",
"start": "2023-11-12T17:43:34.704Z",
"end": "2023-12-12T17:43:34.704Z"
}
```#### `DELETE /events/:id`
Delete an event
## Contact
Rodrigo Queiroz - [email protected]