git clone https://github.com/kdaisho/hello-svelte.git
Once cloned the repository, navigate into it. You'll be prompted to allow direnv to trigger dependency installation.
Then run
direnv allow .
Nix starts installing each dependency listed in shell.nix
.
Once you've created a project and installed dependencies with npm install
(or pnpm install
or yarn
), start a development server:
npm run dev
# or start the server and open the app in a new browser tab
npm run dev -- --open
To create a production version of your app:
npm run build
You can preview the production build with npm run preview
.
To deploy your app, you may need to install an adapter for your target environment.
docker build -t sv:1 .
sv = name, 1 = tag
docker run --rm --network=deno-net -p 5050:5050 sv:1
--rm = cleans up after stopping the container
-p = publish, 5050:5050 = maps port 5050 (right) to 5050 (left) to expose
--network=deno-net = specifies to use 'deno-net' network defined by the server (deno) container
to see list of networks, type docker network ls