Skip to content

Commit

Permalink
add gatsby and nextjs
Browse files Browse the repository at this point in the history
  • Loading branch information
cejaramillof committed Jun 30, 2020
1 parent 646962c commit 02a1753
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 1 deletion.
30 changes: 30 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,3 +75,33 @@ El servidor enviando respuesta en HTML, para ser renderizada en el navegador, Na
- La carga es mucho más rapida (performance)
- Mejor SEO
- Look & Feel

# NextJS
Create folder `next` -> npm init -> `npm i react react-dom next` -> `npm run start`
package.json:
```json
{
"name": "nextjs",
"version": "1.0.0",
"description": "Next js en clase",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"dev": "next",
"build": "next build",
"start": "next start"
},
"author": "",
"license": "ISC",
"dependencies": {
"next": "^9.2.1",
"react": "^16.12.0",
"react-dom": "^16.12.0"
}
}
```

All inside a pages will be a url

# Gatsby
require install global `npm install -g gatsby-cli` -> `gatsby new react-video-gatsby` (download boilerplate and init project) -> `gatsby develop`
Empty file added next/pages/home.js
Empty file.
11 changes: 11 additions & 0 deletions next/pages/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import React from'react';

const Landing = () => {
return (
<div>
Hola Next Js
</div>
);
};

export default Landing;
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"scripts": {
"build": "webpack-cli --config webpack.config.js --colors",
"lint": "eslint src/frontend --ext .js --ext .jsx --fix",
"start:dev": "nodemon src/server/index",
"start:dev": "nodemon src/server/index --ignore src/frontend",
"test": "jest",
"test:watch": "jest --watch",
"test:coverage": "jest --coverage"
Expand Down

0 comments on commit 02a1753

Please sign in to comment.