NODERYX
FRAMEWORK v0.7.1

GETTING STARTED

BUILDING

PRODUCTION

DEVICES

REFERENCE

NODERYX / DOCS / GETTING STARTED / 02
GETTING STARTED / 02

Creating a project

Scaffold a production-shaped Noderyx application, configure it, and have it running locally in a few minutes.

01

Create the application

Use the published framework command without installing anything globally. The generator writes views, controllers, configuration, database folders, Docker support, and npm scripts, then installs dependencies.

TERMINAL
npx noderyx-framework new my-website
NOTE

The project name becomes the folder name, the package name, and the default APP_NAME.

02

Scaffolding options

Flags let you choose a database up front, skip installation, or point the new project at a local framework checkout.

--database=mysql Default. Also accepts postgres and mongo.
--no-install Generate files only; run npm install yourself afterwards.
--local Use a file: dependency on a local framework source instead of the published package.
TERMINAL
npx noderyx-framework new shop --database=postgres npx noderyx-framework new api --database=mongo --no-install
03

Install globally if you prefer a short command

A global installation gives you the bare noderyx command everywhere. It is optional—npx works identically and keeps versions per project.

TERMINAL
npm install -g noderyx-framework noderyx new my-website
NOTE

Per-project versions are safer for teams: each application can sit on the framework release it was tested against.

04

Generate the application key

Sessions, signed cookies, and CSRF tokens all derive from APP_KEY. Generated projects already have one; add it manually when you clone a repository that correctly excludes .env.

TERMINAL
npx noderyx spark:key # write a new key into .env npx noderyx spark:key --show # print one without touching any file
NOTE

In production the key is required and the app refuses to start without it. Rotating it signs everybody out, so spark:key will not overwrite an existing key without --force.

05

Configure the environment

Copy .env.example to .env and set the values your machine needs. Configuration is read once at startup by loadEnvironment() and shaped by noderyx.config.js.

.env
APP_NAME="My Website" APP_URL=http://localhost:3000 NODE_ENV=development PORT=3000 DB_TYPE=mysql DB_HOST=127.0.0.1 DB_NAME=my_website DB_USER=root DB_PASSWORD=
NOTE

.env is in .gitignore from the first commit. Never commit it, and never read secrets into a view.

06

Start developing

The development server watches your files, restarts Node.js, and refreshes the open browser once the server answers again.

TERMINAL
cd my-website npm run dev # Running at http://localhost:3000
NOTE

Use npm run live -- 8080 for a different port, or npm run live -- auto to take the first free one.

07

Add your first route and view

A route maps a path to a handler; render() compiles a .noderframe view with the data you pass. This is the whole loop.

server.js
// server.js app.get("/about", ({ render }) => render("about", { title: "About us", team: ["Ada", "Grace", "Alan"] }));
08

…and the view it renders

Views are indentation-based. A tag, optional classes, optional attributes, then quoted text. Placeholders are escaped for you.

resources/views/about.noderframe
main.cool-container h1 "{{title}}" ul for member in team li "{{member}}"
NOTE

Save the file and the browser refreshes on its own—no build step during development.

09

Verify the installation

Generated projects include a health endpoint and the Node.js test runner. Both are useful in CI and in deployment checks.

TERMINAL
curl http://localhost:3000/health # {"status":"ok","runtime":"Node.js"} npm test
NOTE

The framework updater runs npm test before and after upgrading, so early tests pay for themselves.