CLI
Set up and deploy your first Ember with kiln, the Emberline command-line tool.
This guide walks you through creating a project, running it locally and deploying it to the network.
Prerequisites
Sign up for an Emberline account.
Install
Node.js18 or later.
Node.js version manager
Use a version manager such as nvm or fnm to avoid permission errors and switch Node.js versions easily. kiln requires Node.js 18.0.0 or later.
1. Create a new project
Open a terminal and run the project generator. create-ember scaffolds a project with a configuration file, a sample handler and the CLI installed locally.
- npm
- yarn
- pnpm
npm create ember@latest -- my-first-emberyarn create ember my-first-emberpnpm create ember@latest my-first-emberChoose these options when prompted:
For What would you like to start with?, choose
Hello World.For Which language do you want to use?, choose
TypeScript.For Do you want to use git?, choose
Yes.For Do you want to deploy now?, choose
No(you will deploy at the end).
Then move into the new folder:
cd my-first-emberWhat files did create-ember make?
A src/index.ts handler, an ember.toml configuration file, a package.json with kiln as a dev dependency, and a tsconfig.json.
2. Develop locally
Start a local server that runs your Ember in the same runtime the network uses:
npx kiln devThe first time you run kiln, it opens a browser window so you can sign in. Visit http://localhost:8788 to see your Ember.
kiln dev reloads on every save. Bindings run against local simulators unless you pass --remote.
3. Write code
Open src/index.ts. It exports a default object with a fetch handler:
export default {
async fetch(request: Request, env: Env, ctx: ExecutionContext) {
return new Response("Hello from the edge!");
},
};Change the response text and save:
export default { async fetch(request: Request, env: Env, ctx: ExecutionContext) { return new Response("Hello, Emberline!"); },};No visible change?
Make sure the file saved and that kiln dev is still running. A hard refresh (Shift + reload) bypasses the browser cache.
4. Deploy your project
Deploy to a free *.ember.dev subdomain or a domain you own:
npx kiln deployIf you have not chosen a subdomain yet, kiln asks for one before publishing.
Deploying replaces the live version immediately. Use versions and gradual rollouts to ship to a percentage of traffic first.