tonyfromundefined / nuxt-serverless Goto Github PK
View Code? Open in Web Editor NEWNuxt.js Serverless SSR Starter on AWS (Lambda + API Gateway + S3) with Serverless Framework
Nuxt.js Serverless SSR Starter on AWS (Lambda + API Gateway + S3) with Serverless Framework
Hey dev ๐
Please explain why you change the GZIP behaviour here:
https://github.com/jeehyukwon/nuxt-edge-serverless-template/blob/master/nuxt.config.js#L52-L53
I think you want to disable GZIP because AWS will do it themself, but why do you still use gzip on files that are bigger then 1073741824 ?
Btw: Same question why disabling etag
https://github.com/jeehyukwon/nuxt-edge-serverless-template/blob/master/nuxt.config.js#L51
Hi
I am using this but every time after I deploy the code, the first time I load it (using the custom API Gateway domain), I get a 502 error. Seems that the Lambda gets triggered but times out. When I refresh it loads 100%. Anyone else had this/found a solution?
Hi Tony,
Thanks for creating this repository which I think helps a lot to everyone who wants to go serverless with Nuxt. But I am a bit confused after reading your note about shifting to Next. Can you please explain the issues you were facing to manage the site.
I am new to Nuxt and serverless, so it would be very helpful for me to choose the right tool for my future projects.
Hi Tony!
Looks like great work here. I'm just wondering if this is production-ready? Is this cost-efficient for SSR + S3 + Cloudflare?
serving pages with with lambda is wonderful idea and now that I have played with this I've faced a problem with client side events.
So using the template directly and adding a simple button to the page and try click and triggering either data increment event or a method, for some reason nothing will happens.
index.vue
<template>
<div>
<h1>Nuxt Serverless Template {{ this.version }}</h1>
<p>Say Hello to Node.js 8.10 in AWS Lambda</p>
<router-link to="/hello">hello</router-link>
<router-link to="/world">world</router-link>
<button v-on:click="counter += 1">Add 1</button><!--button-->
<p>The button above has been clicked {{ counter }} times.</p> <!--label to change when event pccurs-->
</div>
</template>
<script lang="ts">
import { Component, Vue, Provide } from "nuxt-property-decorator";
import { State } from "vuex-class";
export default class Index extends Vue {
@State((state) => state.version) private version: string;
@Provide() counter = 1; //data section with counter
}
</script>
After the application is deployed and rendered through lambda the button does not do anything.
yarn sls:deploy
Same also happens when the application is started to locally
yarn start
Any idea why the client side does not do anything after the page has been rendered?
5(index):4 GET https://xx.execute-api.us-east-1.amazonaws.com/_nuxt/b43f66affce113bf8237.js net::ERR_ABORTED 403
favicon.png:1 GET https://xxx.execute-api.us-east-1.amazonaws.com/static/favicon.png 403
Hi Tony,
I really like this project. Very well laid out and clean.
It worked right out of the box which is great. However, when I try to upgrade Nuxt or Vue renderer things break.
Would it be possible to upgrade to latest Vue 2.x and associated Nuxt?
I'd pay for this work if that helps motivate ;)
Hi Tony!
Thank you for making this template. It's exactly what I was looking for :)
When you say "use your own domain", how would you configure that? I presume it means also needing a cloudfront distrubtion, forwarding certain paths to S3, and some to the API Gateway origin?
And I take it the S3 is to store anything static, which is then served via express/nuxt?
Thanks again
Hey there! This template helped me a lot.
Is there any update on adding static file support? Like for /favicon.ico
and /browserconfig.xml
(both live in nuxt's static
folder)
Hi, first off, thanks for this example, it's very helpful to get up and running :)
Is there any way to make serverless work with nuxt-ts in a similar fashion?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.