Newsletter-Signup

所属分类:collect
开发工具:Handlebars
文件大小:0KB
下载次数:0
上传日期:2023-03-21 17:30:35
上 传 者sh-1993
说明:  新闻稿注册,,
(Newsletter-Signup,,)

文件列表:
.glitch-assets (2024, 2023-03-21)
LICENSE (8553, 2023-03-21)
TODO.md (888, 2023-03-21)
app.js (1857, 2023-03-21)
failure.html (909, 2023-03-21)
package-lock.json (80125, 2023-03-21)
package.json (607, 2023-03-21)
public/ (0, 2023-03-21)
public/css/ (0, 2023-03-21)
public/css/styles.css (517, 2023-03-21)
shrinkwrap.yaml (19955, 2023-03-21)
signup.html (2282, 2023-03-21)
src/ (0, 2023-03-21)
src/colors.json (3840, 2023-03-21)
src/pages/ (0, 2023-03-21)
src/pages/index.hbs (4932, 2023-03-21)
src/seo.json (430, 2023-03-21)
success.html (757, 2023-03-21)

# Hello Node! This project includes a Node.js server script and a web page that connects to it. The front-end page presents a form the visitor can use to submit a color name, sending the submitted value to the back-end API running on the server. The server returns info to the page that allows it to update the display with the chosen color. [Node.js](https://nodejs.org/en/about/) is a popular runtime that lets you run server-side JavaScript. This project uses the [Fastify](https://www.fastify.io/) framework and explores basic templating with [Handlebars](https://handlebarsjs.com/). _Last updated: 20 Mar 2023_ ## Prerequisites You'll get best use out of this project if you're familiar with basic JavaScript. If you've written JavaScript for client-side web pages this is a little different because it uses server-side JS, but the syntax is the same! ## What's in this project? ← `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. ← `app.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. ← `package.json`: The NPM packages for your project's dependencies. ← `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. The template receives parameters from the server script, which it includes in the page HTML. The page sends the user submitted color value in the body of a request, or as a query parameter to choose a random color. ← `src/colors.json`: A collection of CSS color names. We use this in the server script 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. ## Try this next Take a look in `TODO.md` for next steps you can try out in your new site! ___Want a minimal version of this project to build your own Node.js app? Check out [Blank Node](https://glitch.com/edit/#!/remix/glitch-blank-node)!___ ![Glitch](https://cdn.glitch.com/a9975ea6-8949-4bab-addb-8a95021dc2da%2FLogo_Color.svg?v=1602781328576) ## You built this with Glitch! [Glitch](https://glitch.com) is a friendly community where millions of people come together to build web apps and websites. - Need more help? [Check out our Help Center](https://help.glitch.com/) for answers to any common questions. - Ready to make it official? [Become a paid Glitch member](https://glitch.com/pricing) to boost your app with private sharing, more storage and memory, domains and more.

近期下载者

相关文件


收藏者