@@ -20,15 +20,89 @@ To accomplish this we need to spin up a simple Express server and configure the
20
20
## Setup
21
21
- Install dependencies:
22
22
``` bash
23
- $ npm i
23
+ $ npm install
24
24
```
25
25
- [Create public wildcard certificate](https://docs.aws.amazon.com/acm/latest/userguide/gs-acm-request-public.html) for your domain (AWS ACM)
26
26
27
27
# # Deploy
28
28
1. ** Deploy service without custom domain:**
29
29
30
30
` ` ` bash
31
- $ sls deploy
31
+ $ npm run deploy
32
+ ` ` `
33
+
34
+ Output:
35
+ ` ` ` bash
36
+
37
+ > aws-node-vue-nuxt-ssr@1.0.0 deploy /home/raha/code/serverless/examples/aws-node-vue-nuxt-ssr
38
+ > npm run build && sls deploy
39
+
40
+
41
+ > aws-node-vue-nuxt-ssr@1.0.0 build /home/raha/code/serverless/examples/aws-node-vue-nuxt-ssr
42
+ > nuxt build
43
+
44
+ nuxt:build Building... +0ms
45
+ nuxt:build App root: /home/raha/code/serverless/examples/aws-node-vue-nuxt-ssr/client +0ms
46
+ nuxt:build Generating /home/raha/code/serverless/examples/aws-node-vue-nuxt-ssr/.nuxt files... +0ms
47
+ nuxt:build Generating files... +40ms
48
+ nuxt:build Generating routes... +7ms
49
+ nuxt:build Building files... +24ms
50
+ ████████████████████ 100%
51
+
52
+ Build completed in 9.783s
53
+
54
+ DONE Compiled successfully in 9788m 01:29:34
55
+
56
+ Hash: 14102c197254534940dd
57
+ Version: webpack 3.12.0
58
+ Time: 9788ms
59
+ Asset Size Chunks Chunk Names
60
+ layouts/default.c7117c4874fb943756b1.js 1.09 kB 0 [emitted] layouts/default
61
+ pages/index.d3fbe26b313c4e3e99b3.js 1.03 kB 1 [emitted] pages/index
62
+ pages/dogs/index.471f8b183d02e42ba618.js 1.18 kB 2 [emitted] pages/dogs/index
63
+ pages/dogs/_breed.4c44d20092b1baf42153.js 1.36 kB 3 [emitted] pages/dogs/_breed
64
+ vendor.e2344f1165d5e54cb7a2.js 157 kB 4 [emitted] vendor
65
+ app.b0ef47f34aef4d684198.js 27.7 kB 5 [emitted] app
66
+ manifest.14102c197254534940dd.js 1.56 kB 6 [emitted] manifest
67
+ LICENSES 705 bytes [emitted]
68
+
69
+ + 3 hidden assets
70
+ Hash: 3be2c5d3c65a2d58b155
71
+ Version: webpack 3.12.0
72
+ Time: 507ms
73
+
74
+ Asset Size Chunks Chunk Names
75
+ server-bundle.json 130 kB [emitted]
76
+
77
+ nuxt:build Building done +11s
78
+
79
+ Serverless: Packaging service...
80
+ Serverless: Excluding development dependencies...
81
+ Serverless: Creating Stack...
82
+ Serverless: Checking Stack create progress...
83
+ .....
84
+ Serverless: Stack create finished...
85
+ Serverless: Uploading CloudFormation file to S3...
86
+ Serverless: Uploading artifacts...
87
+ Serverless: Uploading service .zip file to S3 (42.47 MB)...
88
+ Serverless: Validating template...
89
+ Serverless: Updating Stack...
90
+ Serverless: Checking Stack update progress...
91
+ .................................
92
+ Serverless: Stack update finished...
93
+ Service Information
94
+ service: serverless-side-rendering-vue-nuxt
95
+ stage: dev
96
+ region: us-east-1
97
+ stack: serverless-side-rendering-vue-nuxt-dev
98
+ api keys:
99
+ None
100
+ endpoints:
101
+ ANY - https://< api_id> .execute-api.us-east-1.amazonaws.com/dev
102
+ ANY - https://< api_id> .execute-api.us-east-1.amazonaws.com/dev/{proxy+}
103
+ functions:
104
+ nuxt: serverless-side-rendering-vue-nuxt-dev-nuxt
105
+
32
106
` ` `
33
107
34
108
Once deployed you' ll have your app running on a default API Gateway URI.
@@ -64,17 +138,22 @@ To accomplish this we need to spin up a simple Express server and configure the
64
138
3. **Re-deploy the service with the domain settings:**
65
139
66
140
```bash
67
- $ sls deploy
141
+ $ npm run deploy
68
142
```
69
143
70
144
Output:
71
145
```bash
72
-
146
+ [...same as above but also with the domain info]
147
+ Serverless Domain Manager Summary
148
+ Domain Name
149
+ vuessr.yourdomain.com
150
+ Distribution Domain Name
151
+ <cdn_id>.cloudfront.net
73
152
```
74
153
75
154
76
155
## Usage
77
- Navigate to `vuessr-yourdomain.com` or whichever domain you picked. You' ll se the Vue.js SPA running.
156
+ Navigate to `vuessr-yourdomain.com` or whichever domain you picked. You' ll see the Vue.js SPA running.
78
157
79
158
---
80
159
0 commit comments