Skip to content

Latest commit

 

History

History
32 lines (19 loc) · 1.89 KB

stretch-goals.md

File metadata and controls

32 lines (19 loc) · 1.89 KB

Stretch goals!

If you finish early, or want to keep working on this as a side project after the workshop, here's some ideas on how to upgrade your creation.

It would be a great idea to create a new branch on Git for yourself, so you can experiment and not have to worry about ruining your previous code.

Display the date

Currently each post displays it's timestamp at the bottom. Edit script.js so that the timestamps for the previous blog posts are displayed in a human-readable way.

Display individual posts with URL parameters and templating

Try some more of express's features by adding a page for individual blog posts using express's URL parameters and templating stuff. Tutorial here :).

Use a database

Instead of writing to a file on your hard drive, you could save your blog posts in a database, which would be much quicker in terms of performance if there was a lot of data.

A really simple, quick-to-setup database is Firebase, by Google. Go to their website here and check out their Web Get Started guide.

Host your blog online!

Heroku is a what we call a Platform as a Service. You upload your code to them and it will live on one of their servers, meaning you can access it on the general internet from anywhere!

Heroku is good because they have a lot of free options for small-scale apps, like yours.

Extra reading

There's great resources out there for continuing your Node.js journey. Here they are: