Project Structure
What the scaffolder generates for the Bun and Node.js templates.
The installation scaffold copies one of two small templates depending on the runtime you pick. Both are intentionally minimal — one dependency, one source file.
Bun template
my-arcton-app/
├── package.json
└── src/
└── index.tsimport { Arcton } from '@arcton/core'
const app = Arcton()
app.get('/', () => {
return 'Hello, Arcton!'
})
app.listen()package.json depends on @arcton/core and declares three scripts —
dev, start and compile — covered in Development and
Deployment.
Node.js template
my-arcton-app/
├── package.json
├── tsconfig.json
└── src/
└── index.tsimport { nodeAdapter } from '@arcton/adapter-node'
import { Arcton } from '@arcton/core'
const app = Arcton()
app.get('/', () => {
return 'Hello, Arcton!'
})
app.listen({ adapter: nodeAdapter })The only difference from the Bun template is the extra @arcton/adapter-node
dependency and the adapter: nodeAdapter option passed to listen() — see
Runtimes for why that's the one line that
changes. package.json here declares dev, build and start, and
tsconfig.json configures the TypeScript build used by build.
Growing from here
Both templates are a normal Arcton app — everything in
Fundamentals,
Routing and beyond applies directly to src/index.ts.