A simple REST API using tinyhttp and Prisma
tinyhttp new prismapnpm startThe server is now running on http://localhost:3000.
You can access the REST API of the server using the following endpoints:
/post/:id: Fetch a single post by itsid/feed: Fetch all published posts/filterPosts?searchString=example: SearchString gets used to search through the title and content property of posts
/post: Create a new post- Body:
title: String(required): The title of the postcontent: String(optional): The content of the postauthorEmail: String(required): The email of the user that creates the post
- Body:
/user: Create a new user- Body:
email: String(required): The email address of the username: String(optional): The name of the user
- Body:
/publish/:id: Publish a post by itsid
/post/:id: Delete a post by itsid