Comments (5)
The desktop shell is effectively just a browser - it doesn't read files directly, instead it loads a URL where your UI is hosted.
By default it loads https://app.httptoolkit.tech
, which is the production UI deployment. That's set here.
You can either change that URL directly and make a separate desktop app build, or run the normal desktop build with an APP_URL
env var set pointing to a different URL (though now that I actually look at this, I might change that to HTTPTOOLKIT_APP_URL
in future, just to avoid conflicts here).
If you want to just test locally, you can run npm run start:dev
and it will load http://local.httptoolkit.tech:8080
(this resolves to localhost - it's the default UI URL if you run npm run start
in the UI repo) and won't start its own server (it assumes you'll run one separately - you can do so either by using npm run start
in the UI, or by running npm run start:web
in the UI and npm run start
in a server, if you want to use your own local server build).
Note that for security reasons, the official server releases will only allow connections from app.httptoolkit.tech
. That's defined here. Non-prod builds however will also allow connections from any localhost address. If you want to host a UI on a different URL then you'll need to tweak your server to allow requests from that URL first. Whatever you do though, don't allow all URLs to access this! The server API is very powerful - if you allow requests from any origin, then any web page you load in your browser on the same machine could send requests to your server to launch process & configure proxies etc.
Does that make sense?
from httptoolkit-desktop.
Hey, after some work because I was trying to do the exact same thing, this make sense, and it works ! I have only one question, is there a way to put (or launch) the UI server in local directly when launching the desktop app ?
from httptoolkit-desktop.
If you're not modifying the UI, then you can just run this repo with npm start
and it'll use the existing UI from app.httptoolkit.tech
, in which case you won't need a local server.
If you are modifying the UI, you'll need a separate checkout & web server for that anyway, so yes you do need to separately launch that - the desktop app can't know where that is, and in general I try to keep the components independent so far as possible. You could plausibly build a quick script to launch both if you want to though with a few lines of bash to glue everything together with the right paths for your machine.
from httptoolkit-desktop.
Ok thanks 👍. I think it will be the best choice, I was just wandering if there is a less sketchy way to do it...
Anyway, thanks for your answers! I probably will try to make a PR for localization support, I have some idea how make this
from httptoolkit-desktop.
PRs for localization support would be very welcome indeed! Feel free to open a issue in the UI if you want to discuss that or if you have any questions at all.
from httptoolkit-desktop.
Related Issues (20)
- App connects to Google Analytics HOT 2
- App download does not work without internet on first run HOT 2
- Add prettier to auto format?
- support for offline usage HOT 3
- Document how to do a silent install on Windows HOT 3
- Error with 3221225785 HOT 1
- Error on Windows 7 HOT 5
- Building issue HOT 5
- app crashes HOT 2
- Building Issue Ubuntu 22.04 (improvement) HOT 2
- npm run start:dev fails to start HOT 7
- [Feature suggestion] Implement Built-in Update Check Feature for Enhanced User Experience HOT 3
- Install issue HOT 9
- HTML markup showing up in the Debian installer HOT 6
- Publish native binaries for Apple Silicon HOT 1
- Hi, can you add dark mode please? Everything is way too bright. Thanks. HOT 1
- Publish standalone native Apple Silicon binaries for macOS HOT 1
- HTTP Toolkit not open HOT 1
- 1.14.11 a beta version HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from httptoolkit-desktop.