hi guys, since I am happy seed user for my backend...
# seed
c
hi guys, since I am happy seed user for my backend, I want to also use it for my frontend. Context: single page VueJs app I want it ci/cd -ed on AWS S3. Anyone attempted something similar? Are there docs in place about this? Or this is a bad idea?
t
Are you using seed with SST or serverless-framework? Either way this is fairly normal - personally do full deployment of everything through seed
c
serverless - at least for now
really? that’s awesome news, do you have a start point (some docs maybe) where I can dig in?
t
I have no experience with serverless-framework so will let jay or frank chime in when they have a second
c
thanks thdxr
r
I'm in two minds about this. We currently use Netlify for our frontends, it's literally as simple as pointing it at the Github repo and it builds and is made available on a CDN automatically. If a custom domain is needed, it's a case of adding a TXT record to the DNS. I like the idea of having it in S3 with Cloudfront and it all being deployed together but given how straightforward this is to achieve using Netlify, I've never quite made a strong enough case to move
c
yes, we are aware of Netlify, however we want to reduce the number of external vendors (dependencies) and all the implications for that: added complexity, split pricing…etc. That’s why we always consider first the external partners we are already working and we happy with (that’s why we want to extend Seed to frontend projects). Then ask if they also can to X or Y, and if they do, the’ll we’ll go with them instead of adding a new one which may offer a better solution. But is this solution radically superior? if yes, then we may consider it.
but ok, your situation is different as you already started with Netlify - which is a great product indeed
t
^ plug for SST - we have a construct in there that makes deploying static sites super easy (s3, cloudfront, cache invalidation, etc)
if your frontend is separate you can try using sst to deploy it
c
is separated
r
Yes, we already used Netlify so there has to be a business case for doing the work to move it to AWS and I've not quite made that stack up against everything else that needs to be done!
c
thank you for your help thdxr and Ross
f
Yeah, if you end up taking the SST approach, it’s really takes 4 steps: 1. create an SST app
npx create-serverless-stack@latest my-frontend-app
2. move your Vue.js app into this app and put it in ie.
src
3. open up
lib/MyStack.js
, remove the Api stuff in there and put this 6 lines of code in https://docs.serverless-stack.com/constructs/StaticSite#creating-a-vuejs-site 4. Run
npm run deploy
c
@Frank just one more: how about a Flutter (dart) project ? can I do the same ?
I basically need to run commands such as
flutter build web
and
flutter test web
to build the project for web and test it, but for this the machine running them needs to have flutter installed
can I cam grab it on the fly in
seed.yml
in
before_compile
?
I will probably need something like this:
Copy code
sudo snap install flutter --classic
f
Yup that works!