Skip to content

Commit

Permalink
update artwork
Browse files Browse the repository at this point in the history
  • Loading branch information
ac360 committed Oct 14, 2019
1 parent b2cc6e7 commit 7081f77
Show file tree
Hide file tree
Showing 18 changed files with 214 additions and 7 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Expand Up @@ -6,7 +6,6 @@
v8-compile-cache-*
jest/*
coverage
.serverless_plugins
testProjects/*/package-lock.json
testProjects/*/yarn.lock
.serverlessUnzipped
Expand All @@ -19,7 +18,10 @@ build/
.env*
.cache*
.serverless
.serverless_nextjs
.serverless_plugins
env.js
tmp
package-lock.json
yarn.lock
test
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -22,7 +22,7 @@ You can use them now with the Serverless Framework. [Watch a video guide on usin
- [Development Tips](#development-tips)
- [Available Components](https://github.com/serverless-components)
- [Templates](./templates)
- [Artwork](./artwork)
- [Artwork](https://github.com/serverless/artwork)
- [Join Us on Slack](https://serverless.com/slack)
- [Roadmap](https://github.com/serverless/components/projects/1)

Expand Down
Binary file removed artwork/serverless_components_github_readme.gif
Binary file not shown.
Binary file removed artwork/serverless_components_icon_square_dark.gif
Binary file not shown.
Binary file removed artwork/serverless_components_icon_square_dark.png
Binary file not shown.
21 changes: 21 additions & 0 deletions templates/aws-cloudformation/serverless.yml
@@ -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
2 changes: 1 addition & 1 deletion templates/backend-monolith/code/index.js
Expand Up @@ -17,7 +17,7 @@ module.exports = async (event = {}, ctx) => {
'Access-Control-Allow-Credentials': true,
},
body: {
message: `Response received at "${path}" path via a "${method}" method.`
message: `Response received at "${path}" path via a "${method}" method!!!`
}
}
}
2 changes: 1 addition & 1 deletion templates/backend-monolith/serverless.yml
Expand Up @@ -3,6 +3,6 @@ name: backend-monolith
backend:
component: '@serverless/backend'
inputs:
domain: api.serverless-fullstack.com # Register a custom domain on AWS Route 53 to enable this and SSL.
code:
src: code
# domain: api.serverless-fullstack.com # Register a custom domain on AWS Route 53 to enable this and SSL.
7 changes: 7 additions & 0 deletions templates/cdn/serverless.yml
@@ -0,0 +1,7 @@
name: my-cdn

cdn:
component: '@serverless/cdn'
inputs:
region: us-east-1
# domain: cdn.serverless.com # optional
4 changes: 2 additions & 2 deletions templates/fullstack-application/serverless.yml
Expand Up @@ -9,7 +9,7 @@ dashboard:
hook: npm run build
env:
apiUrl: ${api.url}
# domain: www.serverless-fullstack.com # Insert your custom domain here after registering it on Route53
# domain: www.serverlessmetrics.com # Insert your custom domain here after registering it on Route53

api:
component: '@serverless/backend'
Expand All @@ -19,7 +19,7 @@ api:
env:
dbName: ${database.name}
dbRegion: ${database.region}
# domain: api.serverless-fullstack.com # Insert your custom domain here after registering it on Route53
# domain: api.serverlessmetrics.com # Insert your custom domain here after registering it on Route53

database:
component: '@serverless/aws-dynamodb'
Expand Down
25 changes: 25 additions & 0 deletions templates/nextjs/.gitignore
@@ -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*
55 changes: 55 additions & 0 deletions templates/nextjs/components/nav.js
@@ -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
3 changes: 3 additions & 0 deletions templates/nextjs/next.config.js
@@ -0,0 +1,3 @@
module.exports = {
target: "serverless"
};
18 changes: 18 additions & 0 deletions templates/nextjs/package.json
@@ -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"
}
}
70 changes: 70 additions & 0 deletions templates/nextjs/pages/index.js
@@ -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
6 changes: 6 additions & 0 deletions templates/nextjs/serverless.yml
@@ -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 added templates/nextjs/static/favicon.ico
Binary file not shown.
2 changes: 1 addition & 1 deletion templates/website/serverless.yml
Expand Up @@ -6,4 +6,4 @@ website:
code:
src: dist
hook: npm run build
domain: www.serverlessmetrics.com
# domain: www.serverlessmetrics.com

0 comments on commit 7081f77

Please sign in to comment.