{"id":15209062,"url":"https://github.com/aayush-bhargav/blog-website","last_synced_at":"2026-02-03T14:32:19.359Z","repository":{"id":250555491,"uuid":"834788090","full_name":"Aayush-Bhargav/Blog-Website","owner":"Aayush-Bhargav","description":"This blog website showcases the seamless integration of a custom-built API and EJS (Embedded JavaScript) templating engine to create a dynamic and interactive user experience. The project demonstrates how to build a full-stack web application using Node.js, Express, and PostgreSQL, while utilizing EJS for server-side rendering of HTML.","archived":false,"fork":false,"pushed_at":"2024-07-28T11:52:06.000Z","size":312,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-17T04:46:00.026Z","etag":null,"topics":["api","axios","blog","ejs","ejs-templates","express","full-stack","middleware","nodejs","postgres","postgresql","rest-api"],"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/Aayush-Bhargav.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":"2024-07-28T11:12:47.000Z","updated_at":"2024-07-28T11:53:20.000Z","dependencies_parsed_at":"2024-07-28T12:55:44.841Z","dependency_job_id":null,"html_url":"https://github.com/Aayush-Bhargav/Blog-Website","commit_stats":null,"previous_names":["aayush-bhargav/blog-website"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aayush-Bhargav%2FBlog-Website","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aayush-Bhargav%2FBlog-Website/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aayush-Bhargav%2FBlog-Website/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aayush-Bhargav%2FBlog-Website/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Aayush-Bhargav","download_url":"https://codeload.github.com/Aayush-Bhargav/Blog-Website/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242277020,"owners_count":20101530,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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","axios","blog","ejs","ejs-templates","express","full-stack","middleware","nodejs","postgres","postgresql","rest-api"],"created_at":"2024-09-28T07:21:05.216Z","updated_at":"2026-02-03T14:32:19.316Z","avatar_url":"https://github.com/Aayush-Bhargav.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Blog Website\n\nThis is a very simple blog website that allows users to create, read, update, and delete blog posts. The project is built using Node.js, Express, PostgreSQL, and EJS for templating.\n\n## Installation\n\n Clone the repository\n   ```\n   git clone https://github.com/Aayush-Bhargav/Blog-Website.git\n   cd Blog-Website\n   ```\nInstall dependencies\n```\nnpm install\n```\n## Set up PostgreSQL database\n\n1. Create a PostgreSQL database named `info`.\n\n2. Create a `posts` table using the following SQL:\n```\n    CREATE TABLE posts (\n      id SERIAL PRIMARY KEY,\n      title VARCHAR(100) NOT NULL,\n      content TEXT NOT NULL,\n      author VARCHAR(30) NOT NULL,\n      date TIMESTAMPTZ NOT NULL\n    );\n```\n\n## Set up  Environment Variables\nRun\n```\ncp sampleEnv.txt .env\n```\nand replace the required details.\n\n## Launch\nStart the API server\n```\nnodemon index.js\n```\nStart the Backend server\n```\nnodemon server.js\n```\nOpen your browser and navigate to http://localhost:3000.\n\n## Screenshots\n### Home Page\n![home page](screenshots/homePage.png)\n### New Post\n![new post page](screenshots/newPost.png)\n### Edit Post\n![edit post page](screenshots/editPost.png)\n\n## Usage\n\n- **Home Page**: Displays a list of all blog posts.\n- **New Post**: Click the \"New Post\" button to create a new blog post.\n- **Edit Post**: Click the \"Edit\" link next to a post to edit it.\n- **Delete Post**: Click the \"Delete\" link next to a post to delete it.\n\n## API Endpoints\n\n- **GET /posts**: Retrieve all posts.\n- **GET /posts/:id**: Retrieve a specific post by ID.\n- **POST /posts**: Create a new post.\n- **PATCH /posts/:id**: Update a specific post by ID.\n- **DELETE /posts/:id**: Delete a specific post by ID.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faayush-bhargav%2Fblog-website","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faayush-bhargav%2Fblog-website","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faayush-bhargav%2Fblog-website/lists"}