{"id":20435948,"url":"https://github.com/d4nyll/simple-publishing","last_synced_at":"2026-04-29T15:08:23.981Z","repository":{"id":86821387,"uuid":"112264089","full_name":"d4nyll/simple-publishing","owner":"d4nyll","description":"Simple Publishing API","archived":false,"fork":false,"pushed_at":"2018-12-05T13:43:27.000Z","size":84,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-14T05:02:49.675Z","etag":null,"topics":["demo","demo-app","demo-application","express","express-js","expressjs","swagger"],"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/d4nyll.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":"2017-11-28T00:16:42.000Z","updated_at":"2018-12-05T13:43:29.000Z","dependencies_parsed_at":"2023-07-16T12:46:25.768Z","dependency_job_id":null,"html_url":"https://github.com/d4nyll/simple-publishing","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/d4nyll/simple-publishing","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d4nyll%2Fsimple-publishing","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d4nyll%2Fsimple-publishing/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d4nyll%2Fsimple-publishing/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d4nyll%2Fsimple-publishing/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/d4nyll","download_url":"https://codeload.github.com/d4nyll/simple-publishing/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d4nyll%2Fsimple-publishing/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259763076,"owners_count":22907407,"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":["demo","demo-app","demo-application","express","express-js","expressjs","swagger"],"created_at":"2024-11-15T08:38:35.925Z","updated_at":"2026-04-29T15:08:18.954Z","avatar_url":"https://github.com/d4nyll.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Overview\n\nThis is a simple Create, Read, Delete API, built on Express, and uses a simple in-memory object to mimic a database.\n\n# Install\n\nFirst, [install yarn](https://yarnpkg.com/lang/en/docs/install/).\n\n```\n$ curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -\n$ echo \"deb https://dl.yarnpkg.com/debian/ stable main\" | sudo tee /etc/apt/sources.list.d/yarn.list\n$ sudo apt-get update \u0026\u0026 sudo apt-get install yarn\n```\n\nThen, install package dependencies\n\n```\n$ yarn\n```\n\nLastly, download [Postman](https://www.getpostman.com/); you'll need this to interact with our API.\n\n\n# Configuration\n\n## API\n\nCreate a `.env` file at the root of the directory, with the following content.\n\n```\nAPI_PORT=8080\n```\n\n## Postman\n\nThen, open up Postman and import the Postman Collection; this will install a set of pre-configured requests you can send to our API.\n\nLastly, create a new [Environment](https://www.getpostman.com/docs/postman/environments_and_globals/manage_environments); this will be used to hold values returned from the API, such as `postId`.\n\n\n# Run\n\nUse the `serve` NPM script.\n\n```\n$ yarn run serve\n```\n\n# Use\n\nUsing the Postman Collection, perform the following tasks\n\n1. Create Post - check that the HTTP status code is `200` and that the post's ID is returned\n1. Get Post By ID - check that the HTTP status code is `200` and the response body contains the post's body\n1. Get All Posts - check that the HTTP status code is `200` and it returns with an array of posts\n1. Delete Post By ID - check that the HTTP status code is `200`\n1. Delete Non-Existent Post - check that the HTTP status code is `404` and the request body contains an error object\n1. Calling Non-Existent Endpoint - check that the HTTP status code is `404` and the request body contains an HTML document, which renders to an error message\n1. Calling a Buggy Endpoint - check that the HTTP status code is `500` and an internal server error was throw in the server\n1. Calling with Wrong Method - check that the HTTP status code is `404` and the request body contains an HTML document, which renders to an error message\n\nNote that, in the examples above, we encountered different types of errors:\n\n* Delete Non-Existent Post responded with an error object from the database\n* Other errors are created by Express\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fd4nyll%2Fsimple-publishing","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fd4nyll%2Fsimple-publishing","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fd4nyll%2Fsimple-publishing/lists"}