{"id":19641862,"url":"https://github.com/iamdipankarpaul/post-api-fastify-ejs","last_synced_at":"2026-05-05T09:31:16.662Z","repository":{"id":248492348,"uuid":"703668409","full_name":"iamdipankarpaul/post-api-fastify-ejs","owner":"iamdipankarpaul","description":"Node.js API with Fastify and EJS - Learn CRUD operations with a simple API powered by ChatGPT-generated fake data.","archived":false,"fork":false,"pushed_at":"2023-10-11T17:10:13.000Z","size":19,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-26T23:16:21.103Z","etag":null,"topics":["api-rest","fastify","fastify-plugin","javascript","nodejs","nodemon","npm","npm-module","restapi"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/iamdipankarpaul.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-10-11T17:10:07.000Z","updated_at":"2023-10-16T18:08:48.000Z","dependencies_parsed_at":"2024-07-15T10:30:52.915Z","dependency_job_id":null,"html_url":"https://github.com/iamdipankarpaul/post-api-fastify-ejs","commit_stats":null,"previous_names":["iamdipankarpaul/post-api-fastify-ejs"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/iamdipankarpaul/post-api-fastify-ejs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iamdipankarpaul%2Fpost-api-fastify-ejs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iamdipankarpaul%2Fpost-api-fastify-ejs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iamdipankarpaul%2Fpost-api-fastify-ejs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iamdipankarpaul%2Fpost-api-fastify-ejs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iamdipankarpaul","download_url":"https://codeload.github.com/iamdipankarpaul/post-api-fastify-ejs/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iamdipankarpaul%2Fpost-api-fastify-ejs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32643471,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-04T10:08:07.713Z","status":"online","status_checked_at":"2026-05-05T02:00:06.033Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api-rest","fastify","fastify-plugin","javascript","nodejs","nodemon","npm","npm-module","restapi"],"created_at":"2024-11-11T14:10:44.530Z","updated_at":"2026-05-05T09:31:16.636Z","avatar_url":"https://github.com/iamdipankarpaul.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Simple Post API using NodeJs, EJS and Fastify 😊\n\nI am learning about APIs and CURD operations. This is the third time I am building an API. This time I am using NodeJs, EJS for rendering the templates with pure HTML and JavaScript and fastify web framework for NodeJs. I have used a fake data created by ChatGPT to build and test this API.\n\n## Table of Contents 👇\n\n1. [Installation \u0026 Usage](#installation--usage)\n2. [Endpoints](#endpoints)\n3. [Dependencies](#dependencies)\n4. [Author](#author)\n\n## Installation \u0026 Usage\n\nIt is a simple api that I built for practicing CURD operations, but if you still want to try it out, then follow the steps mentioned below 👇\n\n- Fork the repository in your account in Github.\n- Make project directory and go inside the directory.\n- Clone the repository.\n- Install dependencies.\n- Start or run your API on the local machine.\n\n```shell\n# Make a directory\nmkdir posts-api-fastify-ejs\n\n# go inside the directory\ncd posts-api-fastify-ejs\n\n# Clone the repo\ngit clone https://github.com/...(repo url)\n\n# Install dependencies\nnpm install\n\n# Start the API\nnpm start\n\n# Access the API in your web browser\nhttp://localhost:5000/\n```\n\n## Endpoints\n\n### GET method\n\n```shell\n# Get all the posts\nlocalhost:5000/posts\n\n# Get a single post\nlocalhost:5000/posts/:postId\n\n# Get a form to add new post\nlocalhost:5000/posts/new\n\n# Get a form to edit post\nlocalhost:5000/posts/:postId/edit\n```\n\n### POST method\n\n```shell\n# Add a new post\nlocalhost:5000/posts\n```\n\n### PATCH method\n\n```shell\n# Update a single post\nlocalhost:5000/posts/:postId\n```\n\n### DELETE method\n\n```shell\n# Uelete a single post\nlocalhost:5000/posts/:postId\n```\n\n## Dependencies\n\nHere are some of the major dependencies I have used in this project:\n\n```json\n\"dependencies\": {\n  \"@fastify/formbody\": \"^7.4.0\",\n  \"@fastify/view\": \"^8.2.0\",\n  \"ejs\": \"^3.1.9\",\n  \"fastify\": \"^4.23.2\",\n  \"fastify-method-override\": \"^1.5.10\",\n  \"nanoid\": \"^5.0.1\"\n},\n\"devDependencies\": {\n  \"nodemon\": \"^3.0.1\",\n  \"pino-pretty\": \"^10.2.3\"\n}\n```\n\n## Author\n\nDipankar Paul 😀👍 | Contact me 👉 dipankarpaul2k@gmail.com 😊\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiamdipankarpaul%2Fpost-api-fastify-ejs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fiamdipankarpaul%2Fpost-api-fastify-ejs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiamdipankarpaul%2Fpost-api-fastify-ejs/lists"}