Node.js is a popular runtime that lets you run JavaScript on the server instead of in a browser. This project uses the Fastify framework to explore basic templating with Handlebars and submitting data using forms and querystrings.
← README.md: That’s this file, where you can tell people what your cool website does and how you built it.
← public/style.css: The styling rules for the pages in your site.
← server.js: The Node.js server script for your new site. The JavaScript defines the endpoints in the site back-end, one to return the homepage and one to update with the submitted color. Each one sends data to a Handlebars template which builds these parameter values into the web page the visitor sees.
← src/: This folder holds the main template for your site along with some basic data files.
← src/: This folder holds the site template along with some basic data files.
← src/pages/index.hbs: This is the main page template for your site.
← src/colors.json: A collection of CSS color names. We use this to pick a random color, and to match searches against color names.
← src/seo.json: When you're ready to share your new site or add a custom domain, change SEO/meta settings in here.
Glitch is a friendly community where millions of people come together to build web apps and websites.
- Need more help? Check out our Help Center for answers to any common questions.
- Ready to make it official? Become a paid Glitch member to boost your app with private sharing, more storage and memory, domains and more.