Skip to content

About

A Node.js web application template with explicit assets, routes, build, and deployment boundaries.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

eliware.org

@eliware/web-template License CI

A Node.js web application template with explicit assets, routes, build, and deployment boundaries.

Table of Contents

Features

This template provides a reusable starting point. Each derived repository owns its product behavior and operating decisions.

Requirements

Use Node.js 26 or later and npm 12 or later for repository validation.

Setup

Create a repository from this template. Replace the template name, description, URLs, keywords, and sample content. Run npm ci from the repository root.

Usage

Follow this README and the user guide. Read release notes for release history.

Development

Read AGENTS.md and the specifications index before you change files. Keep documents and records in the repository that owns them.

Testing

Run npm test before handoff. It runs the repository checks through eliware-test.

Troubleshooting

Install the required Node.js and npm versions. Run npm ci after dependency changes. Review the file and rule in any validation error.

Security

Keep credentials, secrets, private data, and runtime state out of Git. Use only approved secret stores for secret values.

Configuration

PORT defaults to 3000 and accepts integers from 1 through 65535. LOG_LEVEL defaults to info. Set LOG_LEVEL to error, warn, info, http, verbose, debug, or silly.

Operations

Run npm run build, then run node bin/web-template.mjs. The server listens on port 3000 by default. Build a local image with docker build -t web-template ..

Template setup — update these values after you create a web application repository.

This template has no published image. Set the image visibility to public or private. Set who can pull it. The workflow builds linux/amd64; confirm or change the supported architectures. Name the owner for build inputs and architecture decisions. Update this section and the publication workflow before you publish an image.

Deploy with an approved version tag and its recorded SHA-256 digest. Image publication does not deploy the site.

Routes

Method Path Result
GET / Serves public/index.html.
GET /client.js Serves dist/client.js.
Other methods Any path Returns HTTP 405.
GET Other paths Returns HTTP 404.

Assets

Keep source assets in public/. The build creates dist/client.js. Keep generated files out of public/. The image includes the page and browser bundle.

Development server

Run npm run build, then run node bin/web-template.mjs. Run npm run puppeteer to install Chrome. Start the server, then run npm run lighthouse. The report goes to ignored artifacts/.

Build

Run npm run build to bundle src/client-entry.mjs as dist/client.js. The aggregate npm test command runs the build. The build output is generated and does not belong in source control.

Deployment

The repository owns the application, image, and publication configuration. Publication does not deploy or start the site. Use an approved GitOps handoff for deployment and rollback.

Support

For help, questions, or to chat with the author and community, visit:

Discordeliware.org

eliware.org on Discord

Links

License

MIT © Eliware

About

A Node.js web application template with explicit assets, routes, build, and deployment boundaries.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages