Giter Site home page Giter Site logo

Comments (4)

kyle-ssg avatar kyle-ssg commented on July 29, 2024

Hey, glad you like the project!

I think the reason for this is quite straight forward. Although you are calling your API in order for the frontend to function, this project also uses the Bullet Train SDK in order to control what features are visible to the frontend (See bulletTrain in project.js, this is an environment key straight from bullet-train.io).

These calls you are seeing are those to bullet train from the js client in order to see what features to show.

https://github.com/BulletTrainHQ/bullet-train-frontend/blob/master/common/stores/config-store.js Is where this is managed.

from flagsmith-frontend.

kyle-ssg avatar kyle-ssg commented on July 29, 2024

You can switch this to use your stack entirely by creating a project in your infrastructure and replicate the flags mentioned in the readme (https://gist.github.com/kyle-ssg/4c65b4185d0fe3ae35f73244de5e2fef), then update the bulletTrain key in project.js and update bulletTrain.init in the project to use your api

bulletTrain.init({
  environmentID: Project.bulletTrain
  api: yourAPIURL
  ...
})

Edit: Pinning issue, think that documentation could be improved here to clear up confusion.

from flagsmith-frontend.

coolcodr avatar coolcodr commented on July 29, 2024

Thanks @kyle-ssg, I don't know which part going wrong, I have tried set the API_URL env variable, update the env/project_dev.js and project.js, but my local bullet-train-frontend still trying to connect https://api.bullet-train.io/api/v1/flags/, for other endpoints it will call my local server.

Is there any js files I need to re-build?

from flagsmith-frontend.

coolcodr avatar coolcodr commented on July 29, 2024

I got it sorted, thank you for pointing me the file: https://github.com/BulletTrainHQ/bullet-train-frontend/blob/master/common/stores/config-store.js, I specify api to my local server and it works now.

from flagsmith-frontend.

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.