Is there any way to start a local run of the UI (u...
# sst
k
Is there any way to start a local run of the UI (using StaticSite) when you run
sst start
?
t
Not at the moment, been thinking about whether this would be useful or if it's better to just run it separately
k
Yeah probably not a big deal, it would just simplify development
One command to run everything
Thanks for the answer 🙂
j
@Kujtim Hoxha btw, what are you using to build your frontend? And how do you start it right now?
k
So the frontend is a vuejs app build with quasar but it is basically as simple as yarn serve
I just start it as a separate process
Also one thing I did is to add the UI related stack only when I run deploy, I think this is something sst should handle the UI resources are not needed for local dev
j
I see. Can you clarify this?
I did is to add the UI related stack only when I run deploy
How are you doing this currently?
k
I am basically just doing something like this
Copy code
if (!process.env.IS_LOCAL) {
    new Sitetack(app, 'SiteStack', apiStack.api, authStack.auth);
  }
j
Oh I see. So currently the StaticSite construct deploys a placeholder site when running locally. Do you mind sharing why you don’t want to deploy it while running it locally?
t
I've been considering doing this to see if it speeds up
sst start
for local dev
k
We use
sst start --stage {developer_name}
for local development and those environments won’t get deployed ever, in addition @thdxr is right, if I remember right
sst start
builds the UI also and in our case that is time wasted
j
Ah. Let me check with @Frank I think the recent versions don’t build the frontend when running locally. Is that right Frank?
f
Yup, v0.30.0+,
sst start
doesn’t build the frontend app, instead a stub site is deployed
k
ah got it thanks
t
Since CF can be slow even for deploying a stub site I decided make it not run on local
f
@thdxr yeah if you run
sst start
after
sst deploy
, it’d need to deploy the stub site again.
If you stop
sst start
and then restart it, it shouldn’t get deployed through CF again.