Comments (6)
Here is the deployment url: https://yjdiw86zpj.execute-api.ap-southeast-2.amazonaws.com/dev
This was a new new Nuxt Create App project. The serverless file looks like this:
service:
name: nuxt-serverless-tmp
plugins:
- serverless-nuxt-plugin
resources:
Resources:
AssetsBucket:
Type: AWS::S3::Bucket
Properties:
BucketName: ${self:custom.nuxt.bucketName}
CorsConfiguration:
CorsRules:
- AllowedMethods:
- GET
- HEAD
AllowedOrigins:
- "*"
provider:
name: aws
region: ap-southeast-2
stage: ${opt:stage, 'dev'}
runtime: nodejs12.x
environment:
NODE_ENV: ${file(.env.${self:provider.stage}.yml):NODE_ENV}
custom:
nuxt:
version: v0.0.1-alpha
bucketName: nuxt-serverless-tmp-${self:provider.stage}
functions:
nuxt:
handler: handler.render
events:
- schedule: rate(5 minutes)
- http: ANY /
- http: ANY /{proxy+}
I deployed the project again from scratch with no changes to any aws config via the console.
from serverless-nuxt.
Nuxt does not support the form of the API Gateway URL(https://***.execute-api.ap-southeast-2.amazonaws.com/dev
). Removing the path(/dev
) after the URL solved the problem. So, Mapping the domain solves it. I recommend the plugins serverless-domain-manager(https://github.com/amplify-education/serverless-domain-manager).
from serverless-nuxt.
I figured it out.
I removed the aliases from route 53. Created a cloudfront distribution that used the custom domain certificate in ACM. I then created a new A name alias to that distribution.
I'll post a tutorial on accidental.dev soon so help anyone else out who might need to do something similar.
Thanks again for your input, I wouldn't have been able to find my way to a solution without it. And thank you for creating such a great package :)
from serverless-nuxt.
The favicon and manifest files are not saved in s3, it is called from labmda.
If you changed the settings related to favicon or manifest in the nuxt.config.js
file, show me the file.
from serverless-nuxt.
Ok great, almost there. That fixes those issues - thank you 👍
I couldn't get the plugin working so reproduced what it does manually in the console.
The only problem I have now is that the site is only accessible via https. How can I automatically redirect all http traffic to https? I saw in a previous help topic you mentioned using edge optimised?
I did that but I still can't access the page via http (https works). Do I need to do something in Cloudfront as well? Nothing seems to have been added automatically. The domain currently still points directly to the lambda in Route53.
from serverless-nuxt.
Thanks for reporting the issue. :-)
from serverless-nuxt.
Related Issues (20)
- [HELP] error undefined HOT 6
- PWA install web app in not coming in the browser HOT 1
- serverless.yml can't get environment variable
- Dependencies not removed HOT 4
- TypeError: Plugin is not a constructor HOT 2
- it's not supported Nuxt Typescript HOT 3
- Getting 404 all the time HOT 1
- `cdnPath` on the built seems to not work as expected. HOT 5
- Feature suggestion: A way to bypass the Nuxt build HOT 2
- Asset files not automatically uploading to S3 bucket HOT 11
- Nuxt Serverless with the Nuxt Content Documentation Theme - Cannot use import statement outside a module HOT 1
- Issue after refreshing page on route HOT 1
- Nuxt PWA module not working HOT 3
- Dependency Dashboard
- Should ACL option be excluded if cdnPath is specified?
- Access Denied error with no details
- Nuxt build process goes into infinite loop
- Demo for https://serverless-nuxt.dist.be/ has been 500 Internal server error
- Is this project still supported? 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 serverless-nuxt.