Getting started
Status: Beta
You can use Nue to build production-ready websites, but with following limitations:
No CSS documentation.
Sketchy Windows support. Nue does not work under Windows but we're working on it
Limited support for single-page applications. There is a tutorial on building a simple SPA, but the support for full-blown reactive applications is very much in progress. All issues regarding Nue JS are marked as low priority because the focus is currently on content-heavy multi-page applications.
System Requirements
- Bun 1.0.10 or later. Recommended with MacOS and Linux.
- Node.js 18.0.2 or later. Recommended with Windows or if you don't want to install Bun
Installation
Nue comes with a command line interface (CLI), which can be reused across multiple websites and/or single-page applications. Install it globally as follows:
bun install nuekit --global
You can verify the installation by running nue --version
. If the output looks something like "Nue 0.5.2 • Bun 1.0.33", you can start building apps with Nue. You can either start from scratch with the help of a tutorial, or you can start with a template:
Start with a template
The easiest way to get started is to pick a template. To choose one, run:
bun create nue@latest
After running the command you are asked to name your project directory and pick the template:
The following templates are available in create-nue repository:
- Skeleton website — Barebones site with two directories/pages
- Skeleton app — Primitive single-page application
- Hot-reload demo — As seen on the front page intro video
- Simple blog — The tutorial app for "Build a simple blog"
- Simple app — The tutorial app for "Build a simple SPA"
- Simple CRM — A more complex single-page application. View demo
- Empty directory — Start from scratch
Running Nue with Node
Nue works under both Bun and Node so you can alternatively install Nue with pnpm
, npm
, and yarn
. For example:
pnpm install nuekit --global
The default engine for Nue is Bun. That is: the command line interface starts with the #!/usr/bin/env bun
shebang. To override this setting, and run Nue with Node, you can do the following:
node $(which nue)
The which
command locates the nue executable, and starts it with node. Running node $(which nue) --version
should output something like "Nue 0.5.2 / Node 21.6.2". You can create a permanent shortcut to this command with alias
. For example:
alias node-nue="node $(which nue)"
To make the above command permanent you should store the alias to your ~/.bashrc
or ~/.zshrc
depending on your system shell.
VS Code Extension
Here's Nue VS code extension for Visual Studio Code users (optional).
Problems?
Please post an issue if Nue does not work on your environment.