Modifying localhost
I would like to use
app.localhost
instead of just localhost, but I can't seem to make a proper configuration on app.config.ts
, nor do I seem to find any examples anywhere.
Thank you for your help 🙂3 Replies
flat-fuchsia•10mo ago
I think you'd have to modify your hosts file I think
Something like this I think?
judicial-coral•10mo ago
On macOS within browsers that are not Safari this works out of the box.
quickest-silverOP•10mo ago
I am developing several things at once, namely a
1. marketing website
2. user dashboard
I am try testing tanstack start as i love query
usually when i do things like this, I want to set up my local dev server to do something like
localhost:3000 for the main website
app.localhost:3000 for the dashboard
etc
That makes it easy to do, for example for a login button
app.(baseurl from env)
ofc also allows to have both things running at once
in react router, you can do something like this with vite
server: {
host: process.env.NODE_ENV === 'production'
? 'app.mydomain.com'
: 'app.localhost',
port: 3000,
},
base: process.env.NODE_ENV === 'production'
? 'https://app.mydomain.com/'
: '/',
@DogPawHat @KiwiKilian