Skip to content

Commit 6069fcc

Browse files
Initial commit from Create Next App
0 parents  commit 6069fcc

File tree

7 files changed

+6428
-0
lines changed

7 files changed

+6428
-0
lines changed

.gitignore

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2+
3+
# dependencies
4+
/node_modules
5+
/.pnp
6+
.pnp.js
7+
8+
# testing
9+
/coverage
10+
11+
# next.js
12+
/.next/
13+
/out/
14+
15+
# production
16+
/build
17+
18+
# misc
19+
.DS_Store
20+
.env*
21+
22+
# debug
23+
npm-debug.log*
24+
yarn-debug.log*
25+
yarn-error.log*

README.md

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/zeit/next.js/tree/canary/packages/create-next-app).
2+
3+
## Getting Started
4+
5+
First, run the development server:
6+
7+
```bash
8+
npm run dev
9+
# or
10+
yarn dev
11+
```
12+
13+
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
14+
15+
You can start editing the page by modifying `pages/index.js`. The page auto-updates as you edit the file.
16+
17+
## Learn More
18+
19+
To learn more about Next.js, take a look at the following resources:
20+
21+
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
22+
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
23+
24+
You can check out [the Next.js GitHub repository](https://github.com/zeit/next.js/) - your feedback and contributions are welcome!
25+
26+
## Deploy on ZEIT Now
27+
28+
The easiest way to deploy your Next.js app is to use the [ZEIT Now Platform](https://zeit.co/) from the creators of Next.js.
29+
30+
Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.

package.json

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"name": "nextjs-rest-api",
3+
"version": "0.1.0",
4+
"private": true,
5+
"scripts": {
6+
"dev": "next dev",
7+
"build": "next build",
8+
"start": "next start"
9+
},
10+
"dependencies": {
11+
"next": "9.2.2",
12+
"react": "16.12.0",
13+
"react-dom": "16.12.0"
14+
}
15+
}

pages/index.js

+203
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,203 @@
1+
import Head from 'next/head'
2+
3+
const Home = () => (
4+
<div className="container">
5+
<Head>
6+
<title>Create Next App</title>
7+
<link rel="icon" href="/favicon.ico" />
8+
</Head>
9+
10+
<main>
11+
<h1 className="title">
12+
Welcome to <a href="https://nextjs.org">Next.js!</a>
13+
</h1>
14+
15+
<p className="description">
16+
Get started by editing <code>pages/index.js</code>
17+
</p>
18+
19+
<div className="grid">
20+
<a href="https://nextjs.org/docs" className="card">
21+
<h3>Documentation &rarr;</h3>
22+
<p>Find in-depth information about Next.js features and API.</p>
23+
</a>
24+
25+
<a href="https://nextjs.org/learn" className="card">
26+
<h3>Learn &rarr;</h3>
27+
<p>Learn about Next.js in an interactive course with quizzes!</p>
28+
</a>
29+
30+
<a
31+
href="https://github.com/zeit/next.js/tree/master/examples"
32+
className="card"
33+
>
34+
<h3>Examples &rarr;</h3>
35+
<p>Discover and deploy boilerplate example Next.js projects.</p>
36+
</a>
37+
38+
<a
39+
href="https://zeit.co/new?filter=next.js&utm_source=create-next-app&utm_medium=default-template&utm_campaign=create-next-app"
40+
className="card"
41+
>
42+
<h3>Deploy &rarr;</h3>
43+
<p>
44+
Instantly deploy your Next.js site to a public URL with ZEIT Now.
45+
</p>
46+
</a>
47+
</div>
48+
</main>
49+
50+
<footer>
51+
<a
52+
href="https://zeit.co?utm_source=create-next-app&utm_medium=default-template&utm_campaign=create-next-app"
53+
target="_blank"
54+
rel="noopener noreferrer"
55+
>
56+
Powered by <img src="/zeit.svg" alt="ZEIT Logo" />
57+
</a>
58+
</footer>
59+
60+
<style jsx>{`
61+
.container {
62+
min-height: 100vh;
63+
padding: 0 0.5rem;
64+
display: flex;
65+
flex-direction: column;
66+
justify-content: center;
67+
align-items: center;
68+
}
69+
70+
main {
71+
padding: 5rem 0;
72+
flex: 1;
73+
display: flex;
74+
flex-direction: column;
75+
justify-content: center;
76+
align-items: center;
77+
}
78+
79+
footer {
80+
width: 100%;
81+
height: 100px;
82+
border-top: 1px solid #eaeaea;
83+
display: flex;
84+
justify-content: center;
85+
align-items: center;
86+
}
87+
88+
footer img {
89+
margin-left: 0.5rem;
90+
}
91+
92+
footer a {
93+
display: flex;
94+
justify-content: center;
95+
align-items: center;
96+
}
97+
98+
a {
99+
color: inherit;
100+
text-decoration: none;
101+
}
102+
103+
.title a {
104+
color: #0070f3;
105+
text-decoration: none;
106+
}
107+
108+
.title a:hover,
109+
.title a:focus,
110+
.title a:active {
111+
text-decoration: underline;
112+
}
113+
114+
.title {
115+
margin: 0;
116+
line-height: 1.15;
117+
font-size: 4rem;
118+
}
119+
120+
.title,
121+
.description {
122+
text-align: center;
123+
}
124+
125+
.description {
126+
line-height: 1.5;
127+
font-size: 1.5rem;
128+
}
129+
130+
code {
131+
background: #fafafa;
132+
border-radius: 5px;
133+
padding: 0.75rem;
134+
font-size: 1.1rem;
135+
font-family: Menlo, Monaco, Lucida Console, Liberation Mono,
136+
DejaVu Sans Mono, Bitstream Vera Sans Mono, Courier New, monospace;
137+
}
138+
139+
.grid {
140+
display: flex;
141+
align-items: center;
142+
justify-content: center;
143+
flex-wrap: wrap;
144+
145+
max-width: 800px;
146+
margin-top: 3rem;
147+
}
148+
149+
.card {
150+
margin: 1rem;
151+
flex-basis: 45%;
152+
padding: 1.5rem;
153+
text-align: left;
154+
color: inherit;
155+
text-decoration: none;
156+
border: 1px solid #eaeaea;
157+
border-radius: 10px;
158+
transition: color 0.15s ease, border-color 0.15s ease;
159+
}
160+
161+
.card:hover,
162+
.card:focus,
163+
.card:active {
164+
color: #0070f3;
165+
border-color: #0070f3;
166+
}
167+
168+
.card h3 {
169+
margin: 0 0 1rem 0;
170+
font-size: 1.5rem;
171+
}
172+
173+
.card p {
174+
margin: 0;
175+
font-size: 1.25rem;
176+
line-height: 1.5;
177+
}
178+
179+
@media (max-width: 600px) {
180+
.grid {
181+
width: 100%;
182+
flex-direction: column;
183+
}
184+
}
185+
`}</style>
186+
187+
<style jsx global>{`
188+
html,
189+
body {
190+
padding: 0;
191+
margin: 0;
192+
font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen,
193+
Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif;
194+
}
195+
196+
* {
197+
box-sizing: border-box;
198+
}
199+
`}</style>
200+
</div>
201+
)
202+
203+
export default Home

public/favicon.ico

14.7 KB
Binary file not shown.

public/zeit.svg

+10
Loading

0 commit comments

Comments
 (0)