Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

research: create deployable exe #63

Open
opensas opened this issue Nov 22, 2024 · 2 comments
Open

research: create deployable exe #63

opensas opened this issue Nov 22, 2024 · 2 comments

Comments

@opensas
Copy link
Owner

opensas commented Nov 22, 2024

deno:

deno 2 compile doesn't work on svelkit issue (with workarounds): denoland/deno#26155

see my comment: denoland/deno#26155 (comment)


sveltejs/cli#214 (comment)

 deno run -A npm:sv@latest create deno-project

SvelteKit at deno: https://deno.com/blog/web-frameworks-on-deno#sveltekit

deno adapter for SvelteKit: https://github.com/pluvial/svelte-adapter-deno

repo with instructions: https://github.com/cotyhamilton/deno-sveltekit?tab=readme-ov-file

workaround for $xxx paths: denoland/deno#17248 (comment)

// deno.json or deno.jsonc
{
  "imports": {
    "$lib": "./src/lib",
    "$lib/": "./src/lib/",
    "$env/static/public": "./.svelte-kit/ambient.d.ts",
    "$env/static/private": "./.svelte-kit/ambient.d.ts",
    "$env/dynamic/public": "./.svelte-kit/ambient.d.ts",
    "$env/dynamic/private": "./.svelte-kit/ambient.d.ts",
    "$app/forms": "../../node_modules/@sveltejs/kit/types/index.d.ts",
    "$app/environment": "../../node_modules/@sveltejs/kit/types/index.d.ts",
    "$app/navigation": "../../node_modules/@sveltejs/kit/types/index.d.ts",
    "$app/server": "../../node_modules/@sveltejs/kit/types/index.d.ts",
    "$app/stores": "../../node_modules/@sveltejs/kit/types/index.d.ts"
  }
}
@opensas
Copy link
Owner Author

opensas commented Nov 22, 2024

deno run -A --reload npm:sv create encuestas-deno

cd encuestas-deno

deno install --allow-scripts=npm:@sveltejs/[email protected]

@opensas
Copy link
Owner Author

opensas commented Nov 23, 2024

bun

bunx sv create my-app
cd my-app 
bun run dev

to compile

bun run build

bun build build/index.js --compile --outfile server

./server 
Listening on 0.0.0.0:3000

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant