
Product
Rust Support Now in Beta
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.
create-roads
Advanced tools
A scaffolding tool for Roads.js applications with TypeScript, React, and modern tooling.
# With npm
npm create roads@latest my-app
# With yarn
yarn create roads my-app
# With pnpm
pnpm create roads my-app
Both templates use roads for server side routing and express as a safe wrapper to handle requests, tailwind for css and react for interactivity. The main difference is how that interactivity is managed.
# Create a new SSR project
create-roads my-ssr-app
# Create a new SPA project
create-roads my-spa-app --template spa
# Specify template and package manager
create-roads my-app --template spa --pm yarn
# Skip dependency installation
create-roads my-app --skip-install
# Show help
create-roads --help
# Show version
create-roads --version
Option | Alias | Description | Values |
---|---|---|---|
--template | -t | Choose template type | default , spa |
--package-manager | --pm | Package manager to use | npm , yarn , pnpm |
--skip-install | Skip dependency installation | ||
--help | -h | Show help message | |
--version | -v | Show version number |
my-app/
├── src/
│ ├── middleware/ # Custom Roads.js middleware
│ ├── projects/
│ │ ├── core/ # Framework utilities
│ │ └── example/ # Example application
│ │ ├── components/ # React components
│ │ └── routes.tsx # Route definitions
│ └── server.ts # Server entry point
├── css/ # Source CSS files
│ └── input.css # Tailwind input file
├── public/ # Static assets
├── package.json
├── tsconfig.json # Server-side TypeScript config
└── tsconfig-frontend.json # Client-side TypeScript config
my-app/
├── src/
│ ├── components/ # Shared components
│ ├── core/ # Core utilities (router, etc.)
│ ├── pages/ # Page components
│ └── main.tsx # Application entry point
├── css/ # Source CSS files
│ └── input.css # Tailwind input file
├── public/ # Static assets and HTML
├── package.json
├── tsconfig.json # TypeScript configuration
└── tailwind.config.js # Tailwind CSS config
# Start development server with auto-restart and file watching
npm run watch-all
# Build TypeScript and start server once
npm start
# Build TypeScript only
npm run build-js
# Build CSS only
npm run build-css
# Watch and rebuild CSS on changes
npm run watch-css
# Start development server (builds and serves)
npm run watch-all
# Build for production
npm run build
# Start static file server only
npm start
# Build JavaScript only
npm run build-js
# Build CSS only
npm run build-css
# Watch and rebuild CSS on changes
npm run watch-css
MIT © Aaron Hedges
FAQs
Scaffolding tool for Roads.js applications
We found that create-roads demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.
Product
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
Security News
Socket CEO Feross Aboukhadijeh joins Risky Business Weekly to unpack recent npm phishing attacks, their limited impact, and the risks if attackers get smarter.