Giter VIP home page Giter VIP logo

Comments (3)

bigherc18 avatar bigherc18 commented on August 25, 2024
  • How do you want to read the JS/TS file ? Deno ?
  • I suggest we avoid nesting, I'd prefer the config to look like
export const config: Configuration<StarknetFilter, PostgresSink> = {
  type: 'starknet',
  streamUrl: 'https://mainnet.starknet.a5a.ch',
  bearerToken: Deno.env.get('DNA_TOKEN'),
  // other options
  startingCursor: 123_456,
  filter: Filter().withHeader({ weak: false }).toObject(),
  sinkType: 'postgres',
  sinkOptions: {
      connectionUrl: 'postgres://....',
    }
  }
}
  • --stream.bearer-token=xxx this looks not so standard to me, I'd prefer it to be just --bearer-token or --stream-bearer-token
  • Why do we need to prefix the sink options with --<sink.type> ? it looks cumbersome to me

from dna.

fracek avatar fracek commented on August 25, 2024
  • Yes, the javascript runtime is Deno. The ts -> js transpilation is provided by a crate that leverages swc
  • I agree it looks better without nesting.
  • The dot in the name is used by some tool (grafana etc, geth) to mimic the nesting in the config. If we remove nesting it's not needed anymore.
  • The prefix is needed to avoid clashing when using env variables. So let's say I need to use a bearer token to authenticate with my db, then it's in the DB_BEARER_TOKEN env variable and doesn't clash with the stream bearer token.

from dna.

fracek avatar fracek commented on August 25, 2024

This was done in #188

from dna.

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.