Giter Club home page Giter Club logo

rotki-dev-proxy's Introduction

Rotki development proxy

This tool has already being merged upstream to the rotki repo, and any changes will happen there.

The proxy's purpose is to provide an easy way to develop the frontend in parallel with the backend, and provide an easy way to test the premium features.

The proxy will automatically pass any requests to the real backend, unless a mocked endpoint implementation exists.

All mock endpoint implementations should be before:

server.use(createProxyMiddleware({ target: backend }));

Otherwise the real backend will handle the requests.

Configuration

You can configure the proxy, with the following environment variables:

  • PORT The port where the proxy listens for incoming connections. (Default: 4243)
  • BACKEND The url of the real backend. (Default: http://localhost:4242)
  • PREMIUM_COMPONENT_DIR The premium components directory. (Optional)

Starting the proxy

After cloning the proxy, you need to go to its directory and run the following commands:

npm ci
npm run serve

Setup Rotki

In order to use rotki with this development proxy you need to create a .env.development.local environment file. Put the file in the frontend directory of rotki. (electron-app).

The file must contain the following entry:

VUE_APP_BACKEND_URL=http://localhost:4243

Adjust accordingly to if you used a custom port for the proxy.

After that you can start rotki via:

npm run electron:serve

Serving the premium components

To serve the premium components using the proxy, you must the PREMIUM_COMPONENT_DIR environment variable. The variable should contain the directory where you store your premium components source code. You must have the variable set before starting the proxy, otherwise the proxy will serve the production components instead.

Before accessing the premium components via the proxy, you must first build the bundle. In order to build the bundle you need to go to the premium components directory and run the following.

yarn build:bundle

rotki-dev-proxy's People

Contributors

kelsos avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

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.