├── client ├── src │ ├── index.css │ ├── components │ │ ├── About │ │ │ ├── style.css │ │ │ └── index.js │ │ ├── Footer │ │ │ ├── style.css │ │ │ └── index.js │ │ ├── Home │ │ │ ├── style.css │ │ │ └── index.js │ │ ├── Contact │ │ │ ├── style.css │ │ │ └── index.js │ │ ├── NotFound │ │ │ ├── style.css │ │ │ └── index.js │ │ └── Header │ │ │ ├── style.css │ │ │ └── index.js │ ├── App.css │ ├── index.js │ ├── App.js │ └── registerServiceWorker.js ├── public │ ├── favicon.ico │ ├── manifest.json │ ├── index.html │ └── service-worker.js ├── .gitignore ├── package.json └── README.md ├── Procfile ├── .gitignore ├── .github └── FUNDING.yml ├── screenshot.gif ├── public └── images │ └── favicon.png ├── package.json ├── .vscode └── launch.json ├── app.js └── README.md /client/src/index.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Procfile: -------------------------------------------------------------------------------- 1 | web: node app.js -------------------------------------------------------------------------------- /client/src/components/About/style.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /client/src/components/Footer/style.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /client/src/components/Home/style.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /client/src/components/Contact/style.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /client/src/components/NotFound/style.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | client/.eslintcache 3 | -------------------------------------------------------------------------------- /client/src/App.css: -------------------------------------------------------------------------------- 1 | main > .container { 2 | padding: 60px 15px 0; 3 | } -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: [primaryobjects] 4 | -------------------------------------------------------------------------------- /screenshot.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/primaryobjects/Node.js-React-Starter-Template/HEAD/screenshot.gif -------------------------------------------------------------------------------- /client/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/primaryobjects/Node.js-React-Starter-Template/HEAD/client/public/favicon.ico -------------------------------------------------------------------------------- /public/images/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/primaryobjects/Node.js-React-Starter-Template/HEAD/public/images/favicon.png -------------------------------------------------------------------------------- /client/src/components/Header/style.css: -------------------------------------------------------------------------------- 1 | ul.navbar-nav a { 2 | text-decoration: none; 3 | margin: 0 10px 0 0; 4 | color: #e0e0e0; 5 | } 6 | 7 | ul.navbar-nav a:hover { 8 | color: lightblue; 9 | } -------------------------------------------------------------------------------- /client/src/components/Home/index.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import './style.css'; 3 | 4 | class Home extends Component { 5 | render() { 6 | return ( 7 | <> 8 |

Home

9 |

Home

10 | 11 | ) 12 | } 13 | } 14 | 15 | export default Home; -------------------------------------------------------------------------------- /client/src/components/About/index.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import './style.css'; 3 | 4 | class About extends Component { 5 | render() { 6 | return ( 7 | <> 8 |

About

9 |

About

10 | 11 | ) 12 | } 13 | } 14 | 15 | export default About; -------------------------------------------------------------------------------- /client/src/components/Contact/index.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import './style.css'; 3 | 4 | class Contact extends Component { 5 | render() { 6 | return ( 7 | <> 8 |

Contact

9 |

Contact

10 | 11 | ) 12 | } 13 | } 14 | 15 | export default Contact; -------------------------------------------------------------------------------- /client/src/components/NotFound/index.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import './style.css'; 3 | 4 | class NotFound extends Component { 5 | render() { 6 | return ( 7 |
8 |

9 | 404 Not Found :( 10 |

11 |
12 | ) 13 | } 14 | } 15 | 16 | export default NotFound; -------------------------------------------------------------------------------- /client/public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "React App", 3 | "name": "Create React App Sample", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "192x192", 8 | "type": "image/png" 9 | } 10 | ], 11 | "start_url": "./index.html", 12 | "display": "standalone", 13 | "theme_color": "#000000", 14 | "background_color": "#ffffff" 15 | } 16 | -------------------------------------------------------------------------------- /client/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/ignore-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | 6 | # testing 7 | /coverage 8 | 9 | # production 10 | /build 11 | 12 | # misc 13 | .DS_Store 14 | .env.local 15 | .env.development.local 16 | .env.test.local 17 | .env.production.local 18 | 19 | npm-debug.log* 20 | yarn-debug.log* 21 | yarn-error.log* 22 | -------------------------------------------------------------------------------- /client/src/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom/client'; 3 | import { BrowserRouter } from 'react-router-dom'; 4 | 5 | import App from './App'; 6 | 7 | import './index.css'; 8 | 9 | import registerServiceWorker from './registerServiceWorker'; 10 | 11 | const root = ReactDOM.createRoot(document.getElementById('root')); 12 | root.render(); 13 | 14 | registerServiceWorker(); 15 | -------------------------------------------------------------------------------- /client/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Program Name 10 | 11 | 12 |
13 | 14 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "nodebootstraper", 3 | "version": "5.0.0", 4 | "dependencies": { 5 | "express": "*", 6 | "pug": "*", 7 | "stylus": "*", 8 | "serve-favicon": "*", 9 | "morgan": "*", 10 | "body-parser": "*", 11 | "method-override": "*" 12 | }, 13 | "engines": { 14 | "node": "*", 15 | "npm": "*" 16 | }, 17 | "scripts": { 18 | "start": "node app.js", 19 | "heroku-postbuild": "cd client && npm install --only=dev && npm install && npm run build" 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /client/src/components/Footer/index.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import { Link } from 'react-router-dom'; 3 | import './style.css'; 4 | import 'bootstrap/dist/css/bootstrap.css'; 5 | import 'bootstrap/dist/js/bootstrap.js'; 6 | 7 | class Footer extends Component { 8 | render() { 9 | return ( 10 | 15 | ) 16 | } 17 | } 18 | 19 | export default Footer; -------------------------------------------------------------------------------- /.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | // Use IntelliSense to learn about possible attributes. 3 | // Hover to view descriptions of existing attributes. 4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 5 | "version": "0.2.0", 6 | "configurations": [ 7 | { 8 | "type": "node", 9 | "request": "launch", 10 | "name": "Launch Program", 11 | "skipFiles": [ 12 | "/**" 13 | ], 14 | "program": "${workspaceFolder}/app.js", 15 | "serverReadyAction": { 16 | "pattern": "listening on port ([0-9]+)", 17 | "uriFormat": "http://localhost:%s", 18 | "action": "openExternally" 19 | } 20 | } 21 | ] 22 | } -------------------------------------------------------------------------------- /client/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "nodebootstraper-client", 3 | "version": "0.2.0", 4 | "private": true, 5 | "dependencies": { 6 | "@popperjs/core": "^2.11.6", 7 | "bootstrap": "^5.2.3", 8 | "react": "^18.2.0", 9 | "create-react-app": "^5.0.1", 10 | "react-dom": "^18.2.0", 11 | "react-router": "^6.8.1", 12 | "react-router-dom": "^6.8.1", 13 | "react-scripts": "5.0.1" 14 | }, 15 | "scripts": { 16 | "start": "react-scripts start", 17 | "build": "react-scripts build", 18 | "test": "react-scripts test --env=jsdom", 19 | "eject": "react-scripts eject" 20 | }, 21 | "proxy": "http://localhost:3000", 22 | "browserslist": { 23 | "production": [ 24 | ">0.2%", 25 | "not dead", 26 | "not op_mini all" 27 | ], 28 | "development": [ 29 | "last 1 chrome version", 30 | "last 1 firefox version", 31 | "last 1 safari version" 32 | ] 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /client/src/App.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | 3 | import { BrowserRouter, Routes, Route } from 'react-router-dom'; 4 | 5 | import Home from './components/Home'; 6 | import Header from './components/Header'; 7 | import Footer from './components/Footer'; 8 | import About from './components/About'; 9 | import Contact from './components/Contact'; 10 | import NotFound from './components/NotFound'; 11 | 12 | import './App.css'; 13 | 14 | class App extends Component { 15 | render() { 16 | return ( 17 | 18 |
19 | 20 |
21 |
22 | 23 | } /> 24 | } /> 25 | } /> 26 | } /> 27 | 28 |
29 |
30 | 31 |