Giter Club home page Giter Club logo

pages-fullstack's Introduction

SvelteKit example with Cloudflare Pages

This is the demo application created by the npm init svelte@next command. The only change is that @sveltejs/adapter-cloudflare has been installed and attached to the svelte.config.js file.

Pages Deployment

Cloudflare Pages automatically deploys this repository.

Here are the settings for the Pages project:

  • Framework preset – None
  • Build commandnpm run build
  • Build output directory.svelte-kit/cloudflare
  • Environment variables
    • NODE_VERSION :: 16

Development

As with any SvelteKit application, you can run npm run dev for SvelteKit's local development experience.

Refer to the SvelteKit documentation for any additional information.

pages-fullstack's People

Contributors

kalepail avatar lukeed avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

pages-fullstack's Issues

Is there a way to use both `svelte-kit dev` and `wrangler pages dev`?

I'd love to be able to use both svelte-kit dev and wrangler pages dev. I've tried

wrangler pages dev ./.svelte-kit/cloudflare -- svelte-kit dev

but that doesn't proxy the assets or the api correctly.

I'm about to try to launch them separately and sense that the cloudflare services are local, but I thought I'd ask first here in case someone has already figured this out.

Doesn't deploy on Cloudflare Pages (needs node v14)

Tried to test this out from the Blog on Cloudflare Pages.

Build fails due to Cloudflare node version being too old.

Is there anyway to build in own CI and push to CF Pages?


> [email protected] postinstall /opt/buildhome/repo/node_modules/esbuild
--
13:25:01.401 | > node install.js
13:25:01.401 |  
13:25:01.546 | npm WARN notsup Unsupported engine for @sveltejs/[email protected]: wanted: {"node":">=14.13"} (current: {"node":"12.18.0","npm":"6.14.4"})

Using /functions convention

This may be an issue for the sveltekit cloudflare adapter team but I'm wondering why this doesn't use the /functions convention for deploying to pages? In looking at the generated code, it's not actually clear to me how server-side functionality like the /todos.json endpoint is accomplished. Is it all in the _workers.js file?

Update?

Any chance we could get a refresh on this repo? Lots of broken stuff with all the updates in sveltekit recently. Thanks!

One question

Hello @lukeed how are you supposed to access environmental variables during runtime, I tried both process.env.ENV_NAME and just ENV_NAME and they both don't work, can you help me

Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.