{"id":15663031,"url":"https://github.com/jedwatson/node-express-workshop-complete","last_synced_at":"2025-05-06T02:33:28.351Z","repository":{"id":66024558,"uuid":"74130901","full_name":"JedWatson/node-express-workshop-complete","owner":"JedWatson","description":"The complete reference implementation for node-express-workshop","archived":false,"fork":false,"pushed_at":"2017-02-26T23:41:42.000Z","size":12,"stargazers_count":18,"open_issues_count":1,"forks_count":4,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-11T00:02:24.464Z","etag":null,"topics":["blog","cms","example","express","javascript","nodejs","website"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JedWatson.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2016-11-18T13:14:06.000Z","updated_at":"2019-07-15T19:00:49.000Z","dependencies_parsed_at":"2023-02-20T19:30:26.589Z","dependency_job_id":null,"html_url":"https://github.com/JedWatson/node-express-workshop-complete","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JedWatson%2Fnode-express-workshop-complete","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JedWatson%2Fnode-express-workshop-complete/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JedWatson%2Fnode-express-workshop-complete/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JedWatson%2Fnode-express-workshop-complete/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JedWatson","download_url":"https://codeload.github.com/JedWatson/node-express-workshop-complete/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252609919,"owners_count":21775904,"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":["blog","cms","example","express","javascript","nodejs","website"],"created_at":"2024-10-03T13:35:16.409Z","updated_at":"2025-05-06T02:33:28.307Z","avatar_url":"https://github.com/JedWatson.png","language":"JavaScript","readme":"# node-express-workshop-complete\n\nThis is the reference implementation for the node-express-workshop I am working on.\n\n\u003e The workshop is still being written, but I'd love feedback on the this project!\n\nThe outcome is a simple blog website using:\n\n* [Node.js](https://nodejs.org/) v7.6+\n* [Express](http://expressjs.com/) for the web server\n* [EJS](http://ejs.co/) for templates\n* [Bootstrap](https://v4-alpha.getbootstrap.com/) for styling\n* [LevelDB](https://github.com/Level/levelup) to store content\n\nThe website includes:\n\n* A home page that displays all blog posts\n* A view that displays the full content of a post\n* A create post form that lets you add a new post to the database\n* Simple 404 (not found) and error handlers\n\n## Setup\n\nFirst, make sure you have Node.js v7.6 or higher installed. Then clone or fork this repository.\n\nThen install the dependencies by running:\n\n```sh\nnpm install\n```\n\nTo start the website, run:\n\n```sh\nnode server\n```\n\nThen visit [localhost:3000](http://localhost:3000) to view the blog.\n\nIf you want to reset the content database, you can do that by running:\n\n```sh\nnode server --reset\n```\n\n## Caveats\n\nThere are a few things you'd want to do in a production app that I haven't included, because the point of this project is to demonstrate the core concepts involved in setting up a database-driven blog / cms with node.js as simply as possible.\n\nSpecifically, it doesn't handle:\n\n* Performance (thousands of posts would cause problems)\n  * Posts on the homepage should be paginated\n  * Markdown is converted to HTML in real time, in a production app you'd cache the output in the database\n* Sessions or security - anyone can add a post\n* Database errors\n* SEO - it doesn't generate friendly URLs, meta tags or a sitemap\n\n## Next Steps\n\nThere are a number of \"good next steps\" you could take from here. They include:\n\n* Customise the style of the blog\n* Add a favicon (hint: there's an express package for that!)\n* Generate friendly IDs for posts, instead of using the current time (there's a package for that too)\n* Give posts an image upload field\n* Add a [Sitemap](https://en.wikipedia.org/wiki/Sitemaps) handler\n* Switch from markdown to a rich HTML editor, e.g. [CKEditor](http://ckeditor.com/), [TinyMCE](https://www.tinymce.com/) or [Trix](https://trix-editor.org/)\n* Use a [different database](http://expressjs.com/en/guide/database-integration.html)\n* Add session management to protect creating posts\n\nIf you're interested in a proper CMS for building Node.js websites, check out [KeystoneJS](http://keystonejs.com/)\n\n## License\n\nMIT License. Copyright (c) 2017 Jed Watson.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjedwatson%2Fnode-express-workshop-complete","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjedwatson%2Fnode-express-workshop-complete","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjedwatson%2Fnode-express-workshop-complete/lists"}