Skip to content

Commit 6993b40

Browse files
committed
done
1 parent d1f03c5 commit 6993b40

37 files changed

+9552
-1
lines changed

.DS_Store

6 KB
Binary file not shown.

.babelrc

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"presets": ["next/babel"],
3+
"plugins": []
4+
}

.gitignore

+115
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
2+
# Created by https://www.gitignore.io/api/node
3+
# Edit at https://www.gitignore.io/?templates=node
4+
5+
### Node ###
6+
# Logs
7+
logs
8+
*.log
9+
npm-debug.log*
10+
yarn-debug.log*
11+
yarn-error.log*
12+
lerna-debug.log*
13+
14+
.next
15+
.serverless
16+
.serverless_nextjs
17+
18+
# Diagnostic reports (https://nodejs.org/api/report.html)
19+
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
20+
21+
# Runtime data
22+
pids
23+
*.pid
24+
*.seed
25+
*.pid.lock
26+
27+
# Directory for instrumented libs generated by jscoverage/JSCover
28+
lib-cov
29+
30+
# Coverage directory used by tools like istanbul
31+
coverage
32+
*.lcov
33+
34+
# nyc test coverage
35+
.nyc_output
36+
37+
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
38+
.grunt
39+
40+
# Bower dependency directory (https://bower.io/)
41+
bower_components
42+
43+
# node-waf configuration
44+
.lock-wscript
45+
46+
# Compiled binary addons (https://nodejs.org/api/addons.html)
47+
build/Release
48+
49+
# Dependency directories
50+
node_modules/
51+
jspm_packages/
52+
53+
# TypeScript v1 declaration files
54+
typings/
55+
56+
# TypeScript cache
57+
*.tsbuildinfo
58+
59+
# Optional npm cache directory
60+
.npm
61+
62+
# Optional eslint cache
63+
.eslintcache
64+
65+
# Optional REPL history
66+
.node_repl_history
67+
68+
# Output of 'npm pack'
69+
*.tgz
70+
71+
# Yarn Integrity file
72+
.yarn-integrity
73+
74+
# dotenv environment variables file
75+
.env
76+
.env.test
77+
78+
# parcel-bundler cache (https://parceljs.org/)
79+
.cache
80+
81+
# next.js build output
82+
.next
83+
84+
# nuxt.js build output
85+
.nuxt
86+
87+
# rollup.js default build output
88+
dist/
89+
90+
# Uncomment the public line if your project uses Gatsby
91+
# https://nextjs.org/blog/next-9-1#public-directory-support
92+
# https://create-react-app.dev/docs/using-the-public-folder/#docsNav
93+
# public
94+
95+
# Storybook build outputs
96+
.out
97+
.storybook-out
98+
99+
# vuepress build output
100+
.vuepress/dist
101+
102+
# Serverless directories
103+
.serverless/
104+
105+
# FuseBox cache
106+
.fusebox/
107+
108+
# DynamoDB Local files
109+
.dynamodb/
110+
111+
# Temporary folders
112+
tmp/
113+
temp/
114+
115+
# End of https://www.gitignore.io/api/node

.npmrc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
save-exact=true

README.md

+48-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,49 @@
11
# nextjs-serverless
2-
next.js with serverless
2+
3+
next.js with aws serverless
4+
- using aws lambda, s3, cloudfront
5+
- typescript
6+
- next.js ( react.js )
7+
8+
# development
9+
10+
```bash
11+
npm run dev
12+
# or
13+
yarn dev
14+
```
15+
16+
## build & start server in local
17+
18+
```bash
19+
#
20+
# source build
21+
#
22+
npm run build
23+
# or
24+
yarn build
25+
26+
#
27+
# start local server
28+
#
29+
npm run start
30+
# or
31+
yarn start
32+
```
33+
34+
## deploy
35+
36+
First, You should configure about aws credential.
37+
- AWS_ACCESS_KEY
38+
- AWS_SECRET_ACESS_KEY
39+
40+
```bash
41+
npm run deploy
42+
# or
43+
yarn deploy
44+
```
45+
46+
### Reference
47+
48+
https://www.serverless.com/blog/serverless-nextjs/
49+
https://github.com/danielcondemarin/serverless-next.js#motivation

next-env.d.ts

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/// <reference types="next" />
2+
/// <reference types="next/types/global" />

next.config.js

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
const withImages = require('next-images')
2+
3+
module.exports = withImages({
4+
target: 'serverless',
5+
inlineImageLimit: 8 * 1024,
6+
})

0 commit comments

Comments
 (0)