Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
18 changed files
with
214 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name: my-service | ||
|
||
myStack: | ||
component: '@serverless/aws-cloudformation' | ||
inputs: | ||
stackName: example-stack-1 | ||
template: | ||
AWSTemplateFormatVersion: '2010-09-09' | ||
Description: Example stack 1 | ||
Resources: | ||
LogGroup: | ||
Type: AWS::Logs::LogGroup | ||
Properties: | ||
LogGroupName: /log/group/one | ||
RetentionInDays: 14 | ||
Outputs: | ||
LogGroupArn: | ||
Value: | ||
Fn::GetAtt: | ||
- LogGroup | ||
- Arn |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
name: my-cdn | ||
|
||
cdn: | ||
component: '@serverless/cdn' | ||
inputs: | ||
region: us-east-1 | ||
# domain: cdn.serverless.com # optional |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. | ||
|
||
# dependencies | ||
/node_modules | ||
/.pnp | ||
.pnp.js | ||
|
||
# testing | ||
/coverage | ||
|
||
# next.js | ||
/.next/ | ||
/out/ | ||
|
||
# production | ||
/build | ||
|
||
# misc | ||
.DS_Store | ||
.env* | ||
|
||
# debug | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
import React from 'react' | ||
import Link from 'next/link' | ||
|
||
const links = [ | ||
{ href: 'https://github.com/zeit/next.js', label: 'GitHub' } | ||
].map(link => { | ||
link.key = `nav-link-${link.href}-${link.label}` | ||
return link | ||
}) | ||
|
||
const Nav = () => ( | ||
<nav> | ||
<ul> | ||
<li> | ||
<Link href='/'> | ||
<a>Home</a> | ||
</Link> | ||
</li> | ||
{links.map(({ key, href, label }) => ( | ||
<li key={key}> | ||
<a href={href}>{label}</a> | ||
</li> | ||
))} | ||
</ul> | ||
|
||
<style jsx>{` | ||
:global(body) { | ||
margin: 0; | ||
font-family: -apple-system, BlinkMacSystemFont, Avenir Next, Avenir, | ||
Helvetica, sans-serif; | ||
} | ||
nav { | ||
text-align: center; | ||
} | ||
ul { | ||
display: flex; | ||
justify-content: space-between; | ||
} | ||
nav > ul { | ||
padding: 4px 16px; | ||
} | ||
li { | ||
display: flex; | ||
padding: 6px 8px; | ||
} | ||
a { | ||
color: #067df7; | ||
text-decoration: none; | ||
font-size: 13px; | ||
} | ||
`}</style> | ||
</nav> | ||
) | ||
|
||
export default Nav |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
module.exports = { | ||
target: "serverless" | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"name": "nextjs", | ||
"version": "0.1.0", | ||
"private": true, | ||
"scripts": { | ||
"dev": "next dev", | ||
"build": "next build", | ||
"start": "next start" | ||
}, | ||
"dependencies": { | ||
"next": "9.0.5", | ||
"react": "16.9.0", | ||
"react-dom": "16.9.0" | ||
}, | ||
"devDependencies": { | ||
"serverless-next.js": "^1.0.1" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
import React from 'react' | ||
import Link from 'next/link' | ||
import Head from 'next/head' | ||
import Nav from '../components/nav' | ||
|
||
const Home = () => ( | ||
<div> | ||
<Head> | ||
<title>Serverless Next.js</title> | ||
</Head> | ||
|
||
<Nav /> | ||
|
||
<div className='hero'> | ||
<h1 className='title'>Welcome to Serverless Next.js!</h1> | ||
<p className='description'> | ||
This runs on AWS Lambda@Edge. | ||
</p> | ||
</div> | ||
|
||
<style jsx>{` | ||
.hero { | ||
width: 100%; | ||
color: #333; | ||
} | ||
.title { | ||
margin: 0; | ||
width: 100%; | ||
padding-top: 80px; | ||
line-height: 1.15; | ||
font-size: 48px; | ||
} | ||
.title, | ||
.description { | ||
text-align: center; | ||
} | ||
.row { | ||
max-width: 880px; | ||
margin: 80px auto 40px; | ||
display: flex; | ||
flex-direction: row; | ||
justify-content: space-around; | ||
} | ||
.card { | ||
padding: 18px 18px 24px; | ||
width: 220px; | ||
text-align: left; | ||
text-decoration: none; | ||
color: #434343; | ||
border: 1px solid #9b9b9b; | ||
} | ||
.card:hover { | ||
border-color: #067df7; | ||
} | ||
.card h3 { | ||
margin: 0; | ||
color: #067df7; | ||
font-size: 18px; | ||
} | ||
.card p { | ||
margin: 0; | ||
padding: 12px 0 0; | ||
font-size: 13px; | ||
color: #333; | ||
} | ||
`}</style> | ||
</div> | ||
) | ||
|
||
export default Home |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
name: ssr-nextjs | ||
|
||
nextApp: | ||
component: serverless-next.js | ||
inputs: | ||
# domain: www.serverless-nextjs.com # Register this on AWS Route53 first |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters