Skip to content

mastrojs/template-basic-node

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mastro Template Basic for Node.js

This is a basic TypeScript template for Mastro when using Node.js.

Click the green Use this template button in the top right to create your own copy of this repository. Then clone the Code to your computer.

Run locally

If you have multiple projects on your computer that require different Node.js versions, you should install a tool to manage those version for you; for example Volta (see pnpm Support).

Mastro requires Node.js >=23.8.0 (unless you want to install a URLPattern polyfill).

JSR recommends to use pnpm.

The first time, you need to:

pnpm install

After that, to start the server:

pnpm run start

and open http://localhost:8000 in your browser.

To generate the whole static site (this will create a generated folder):

pnpm run generate

Next steps

To see how the Mastro web framework works, follow the guide.

To make sure you're on the latest Mastro version:

pnpm update @mastrojs/mastro --latest

Deploy to production

Check out the Mastro guide deploy with Deno via CI/CD. The Node.js setup should be similar and we'll update the guide shortly.

About

Basic template for a Mastro project using Node.js

Resources

Stars

Watchers

Forks