Giter Site home page Giter Site logo

Comments (3)

dferber90 avatar dferber90 commented on May 20, 2024

Unfortunately we don't have support for working offline at the moment.

However one way to do this yourself would be to:

  • create your own client which internally forwards calls to @vercel/edge-config if you want to work online
  • set up an environment variable like OFFLINE=1
  • make your own client check whether the env var if set
  • if it is set, return values from a local json file instead

Note that you'd need to import the JSON file directly into your code as reading the file system is not possible from the edge runtime. This might end up in your production bundle if you are not careful though. Another alternative would be to start a local server during development and have your custom client fetch form there instead.

It's a bit manual but it should get you there most of the way.

I'm curious about your use case for working offline. Is it because you are traveling and don't have wifi?

I'll close this issue for now as we have offline support on the roadmap anyhow. But it will likely be a bit until we get around to it.

from storage.

karlo-humanmanaged avatar karlo-humanmanaged commented on May 20, 2024

Hi, thanks for the reply. Not only that a lot of us are on the road most of the time, we also need some flexibility around keys that would have different values depending on the task we're working on during local development e.g. api endpoints, auth audiences, etc

from storage.

dferber90 avatar dferber90 commented on May 20, 2024

#166 should help here. Once that lands it will allow supplying your own custom connection string. That way you can run a custom edge config server while working offline during development.

from storage.

Related Issues (20)

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.