├── public ├── favicon.ico ├── logo192.png ├── logo512.png ├── robots.txt ├── manifest.json └── index.html ├── src ├── components │ ├── Header.js │ ├── LoginPage.js │ ├── Topbar.js │ ├── Post.js │ ├── SinglePost.js │ └── SignupPage.js ├── pages │ ├── SinglePage.js │ ├── Auth.js │ ├── Create.js │ └── HomePage.js ├── index.js ├── index.css ├── App.js └── App.css ├── models ├── User.js └── Post.js ├── .gitignore ├── routes ├── users.js ├── auth.js └── posts.js ├── utils └── connectDB.js ├── package.json ├── server.js └── README.md /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kevin-Cruz-Hub/Blog-app/HEAD/public/favicon.ico -------------------------------------------------------------------------------- /public/logo192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kevin-Cruz-Hub/Blog-app/HEAD/public/logo192.png -------------------------------------------------------------------------------- /public/logo512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kevin-Cruz-Hub/Blog-app/HEAD/public/logo512.png -------------------------------------------------------------------------------- /public/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /src/components/Header.js: -------------------------------------------------------------------------------- 1 | function Header() { 2 | return ( 3 |
4 |
5 |
6 |
7 | ) 8 | } 9 | export default Header; -------------------------------------------------------------------------------- /src/pages/SinglePage.js: -------------------------------------------------------------------------------- 1 | import SinglePost from "../components/SinglePost"; 2 | 3 | function SinglePage() { 4 | return ( 5 |
6 |

Single Page

7 | 8 |
9 | ) 10 | } 11 | export default SinglePage; -------------------------------------------------------------------------------- /models/User.js: -------------------------------------------------------------------------------- 1 | const mongoose = require('mongoose'); 2 | 3 | const UserSchema = new mongoose.Schema({ 4 | username: { type: String, required: true, min: 4, unique: true }, 5 | password: { type: String, required: true }, 6 | email: { type: String, unique: true } 7 | },{timestamps:true}) 8 | 9 | const User = mongoose.model('User', UserSchema); 10 | 11 | module.exports = User; -------------------------------------------------------------------------------- /src/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom/client'; 3 | import './index.css'; 4 | import App from './App'; 5 | import{BrowserRouter as Router} from 'react-router-dom' 6 | 7 | 8 | const root = ReactDOM.createRoot(document.getElementById('root')); 9 | root.render( 10 | 11 | 12 | 13 | 14 | 15 | ); 16 | 17 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 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 | .env 8 | 9 | # testing 10 | /coverage 11 | 12 | # production 13 | /build 14 | 15 | # misc 16 | .DS_Store 17 | .env.local 18 | .env.development.local 19 | .env.test.local 20 | .env.production.local 21 | 22 | npm-debug.log* 23 | yarn-debug.log* 24 | yarn-error.log* 25 | -------------------------------------------------------------------------------- /src/components/LoginPage.js: -------------------------------------------------------------------------------- 1 | function LoginPage() { 2 | return ( 3 |
4 |

Login

5 |
6 | 7 | 8 | 9 |
10 |

11 |
12 | ) 13 | } 14 | export default LoginPage; -------------------------------------------------------------------------------- /src/index.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin: 0; 3 | font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 4 | 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', 5 | sans-serif; 6 | -webkit-font-smoothing: antialiased; 7 | -moz-osx-font-smoothing: grayscale; 8 | } 9 | 10 | code { 11 | font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', 12 | monospace; 13 | } 14 | -------------------------------------------------------------------------------- /models/Post.js: -------------------------------------------------------------------------------- 1 | const mongoose = require('mongoose'); 2 | const { Schema } = mongoose 3 | 4 | const PostSchema = Schema({ 5 | title:{type:String, required:true, unique:true}, 6 | description:{type:String, required:true}, 7 | photos:{type:String, required: false}, 8 | username:{type:String, required: true} 9 | }, { timestamps: true }) 10 | 11 | const Post = mongoose.model('Post', PostSchema); 12 | 13 | module.exports = Post; -------------------------------------------------------------------------------- /src/components/Topbar.js: -------------------------------------------------------------------------------- 1 | import { Link } from 'react-router-dom' 2 | function Topbar() { 3 | const user = false; 4 | return ( 5 |
6 | 11 |
12 | ) 13 | } 14 | export default Topbar; -------------------------------------------------------------------------------- /routes/users.js: -------------------------------------------------------------------------------- 1 | const router = require('express').Router() 2 | const Post = require('../models/Post') 3 | 4 | // ** Create => post 5 | // ** Read => get 6 | // ** Updating => put 7 | // ** Delete => delete 8 | 9 | // //Update 10 | router.put('/:id', async (req, res) => { 11 | if (req.body.userId === req.params.id) { 12 | try { 13 | 14 | } catch (err) { 15 | res.status(500).json(err) 16 | } 17 | }else{ 18 | res.status(401).json('You are not allowed to update') 19 | } 20 | }) 21 | 22 | module.exports = router -------------------------------------------------------------------------------- /public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "React App", 3 | "name": "Create React App Sample", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | }, 10 | { 11 | "src": "logo192.png", 12 | "type": "image/png", 13 | "sizes": "192x192" 14 | }, 15 | { 16 | "src": "logo512.png", 17 | "type": "image/png", 18 | "sizes": "512x512" 19 | } 20 | ], 21 | "start_url": ".", 22 | "display": "standalone", 23 | "theme_color": "#000000", 24 | "background_color": "#ffffff" 25 | } 26 | -------------------------------------------------------------------------------- /src/pages/Auth.js: -------------------------------------------------------------------------------- 1 | import { useState } from 'react' 2 | import React from 'react' 3 | import LoginPage from '../components/LoginPage'; 4 | import SignupPage from '../components/SignupPage'; 5 | 6 | function Auth() { 7 | const [showLogin, setShowLogin] = useState(true) 8 | 9 | 10 | return ( 11 |
12 | 13 |

setShowLogin(!showLogin)} className='heading'>{showLogin?"Sign up": 'Login'}

14 | { 15 | showLogin ? ( 16 | 17 | 18 | ) : ( 19 | 20 | ) 21 | } 22 |
23 | ) 24 | } 25 | export default Auth; -------------------------------------------------------------------------------- /src/pages/Create.js: -------------------------------------------------------------------------------- 1 | import ReactQuill from "react-quill"; 2 | import 'react-quill/dist/quill.snow.css' 3 | function Create() { 4 | return ( 5 |
6 |

Create Blog

7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | ) 17 | } 18 | export default Create; -------------------------------------------------------------------------------- /src/pages/HomePage.js: -------------------------------------------------------------------------------- 1 | import { useEffect, useState } from 'react' 2 | import axios from 'axios' 3 | import Header from '../components/Header' 4 | import Post from '../components/Post'; 5 | 6 | function HomePage() { 7 | const [posts, setPosts] = useState([]) 8 | 9 | useEffect(() => { 10 | const fetchPosts = async ()=>{ 11 | const res = await axios.get('/post') 12 | setPosts(res.data) 13 | } 14 | fetchPosts() 15 | }, []) 16 | return ( 17 | 18 |
19 |
20 |

Home Page

21 | { 22 | posts.map(post=>{ 23 | 24 | }) 25 | } 26 |
27 | ) 28 | } 29 | export default HomePage; -------------------------------------------------------------------------------- /utils/connectDB.js: -------------------------------------------------------------------------------- 1 | const mongoose = require('mongoose') 2 | 3 | module.exports = function connectDB(){ 4 | // Connecting to MongoDB 5 | mongoose.connect(process.env.DATABASE_URL) 6 | 7 | // Check for a connection 8 | const db = mongoose.connection; 9 | 10 | // Test the close 11 | // setTimeout(()=>{ 12 | // db.close(); 13 | // },5000) 14 | 15 | // lets the user know of an error 16 | db.on('error',(e)=> console.log(e)) 17 | // Lets the user know if MongoDB was connected 18 | db.on('open',(e)=> console.log('Connected to MongoDB')) 19 | // Lets the iser know if MongoDB session ended 20 | db.on('close',(e)=> console.log('MongoDB session has ended')) 21 | 22 | } -------------------------------------------------------------------------------- /src/App.js: -------------------------------------------------------------------------------- 1 | import{Routes, Route} from 'react-router-dom' 2 | import Topbar from './components/Topbar'; 3 | import HomePage from './pages/HomePage' 4 | import SinglePage from './pages/SinglePage'; 5 | import Create from './pages/Create'; 6 | import Auth from './pages/Auth'; 7 | import './App.css'; 8 | 9 | function App() { 10 | 11 | return ( 12 |
13 | 14 | 15 | }/> 16 | }/> 17 | }/> 18 | }/> 19 | 20 |
21 | ); 22 | } 23 | 24 | export default App; 25 | -------------------------------------------------------------------------------- /src/components/Post.js: -------------------------------------------------------------------------------- 1 | import { format } from "date-fns" 2 | import { Link } from 'react-router-dom' 3 | 4 | function Post({ post }) { 5 | return ( 6 |
7 | const location = useLocation() 8 |
9 | {post.photo && ( 10 | pic 11 | 12 | )} 13 |
14 |
15 | 16 |

{post.title}

17 | 18 |

{post.description}

19 | {post.username}- 20 |
21 |
22 | ) 23 | } 24 | export default Post; -------------------------------------------------------------------------------- /routes/auth.js: -------------------------------------------------------------------------------- 1 | const bcrypt = require('bcrypt') 2 | const router = require('express').Router() 3 | const User = require('../models/User') 4 | 5 | // ** Create => post 6 | // ** Read => get 7 | // ** Updating => put 8 | // ** Delete => delete 9 | 10 | // //Signup 11 | router.post('/signup', async (req, res) => { 12 | try { 13 | const salt = await bcrypt.genSalt(10) 14 | const hashedPass = await bcrypt.hash(req.body.password, salt) 15 | const newUser = new User({ username: req.body.username, email: req.body.email, password: hashedPass }) 16 | 17 | const user = await newUser.save() 18 | res.status(200).json(user) 19 | } catch (err) { 20 | res.status(500).json(err) 21 | } 22 | }) 23 | // //Login 24 | 25 | router.post('/login'), async(req,res)=>{ 26 | try{ 27 | const user = User.findOne({username:req.body.username}) 28 | !user&&res.status(400).json('There is now account with that username') 29 | 30 | const validate = await bcrypt.compare(req.body.password, password) 31 | !validate&&res.status(400).json('Wrong Password') 32 | 33 | const {password, ...others} = user.doc; 34 | res.status(200).json(others) 35 | }catch(err){ 36 | res.status(500).json(err) 37 | } 38 | } 39 | 40 | module.exports = router -------------------------------------------------------------------------------- /src/components/SinglePost.js: -------------------------------------------------------------------------------- 1 | import axios from 'axios' 2 | import { format } from "date-fns" 3 | import { useEffect, useState } from "react"; 4 | import { useLocation } from "react-router-dom"; 5 | 6 | function SinglePost() { 7 | const location = useLocation() 8 | const path = console.log(location.pathname.split('/')[2]) 9 | const [post, setPost] = useState({}) 10 | 11 | useEffect(() => { 12 | const getPost = async () => { 13 | const res = await axios.get(`/post/${path}`) 14 | setPost(res.data) 15 | } 16 | getPost() 17 | }, []) 18 | return ( 19 |
20 |

Single Post

21 |
22 | {post.photo && ( 23 |
24 | pic 25 |
26 | )} 27 |
28 |

{post.title}

29 |

{post.description}

30 |

31 | {post.username}- 32 |

33 | 34 | 35 |
36 |
37 |
38 | ) 39 | } 40 | export default SinglePost; 41 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "react-blog", 3 | "version": "0.1.0", 4 | "private": true, 5 | "dependencies": { 6 | "@testing-library/jest-dom": "^5.17.0", 7 | "@testing-library/react": "^13.4.0", 8 | "@testing-library/user-event": "^13.5.0", 9 | "axios": "^1.5.0", 10 | "bcrypt": "^5.1.1", 11 | "date-fns": "^2.30.0", 12 | "dotenv": "^16.3.1", 13 | "express": "^4.18.2", 14 | "mongoose": "^7.5.3", 15 | "morgan": "^1.10.0", 16 | "multer": "^1.4.5-lts.1", 17 | "react": "^18.2.0", 18 | "react-dom": "^18.2.0", 19 | "react-quill": "^2.0.0", 20 | "react-router-dom": "^6.16.0", 21 | "react-scripts": "5.0.1", 22 | "serve-favicon": "^2.5.0", 23 | "web-vitals": "^2.1.4" 24 | }, 25 | "scripts": { 26 | "start": "react-scripts start", 27 | "build": "react-scripts build", 28 | "test": "react-scripts test", 29 | "eject": "react-scripts eject", 30 | "server": "nodemon index.js --ignore client" 31 | }, 32 | "eslintConfig": { 33 | "extends": [ 34 | "react-app", 35 | "react-app/jest" 36 | ] 37 | }, 38 | "browserslist": { 39 | "production": [ 40 | ">0.2%", 41 | "not dead", 42 | "not op_mini all" 43 | ], 44 | "development": [ 45 | "last 1 chrome version", 46 | "last 1 firefox version", 47 | "last 1 safari version" 48 | ] 49 | }, 50 | "proxy": "http://localhost:3001/api" 51 | } 52 | -------------------------------------------------------------------------------- /src/components/SignupPage.js: -------------------------------------------------------------------------------- 1 | import React, { useState } from 'react' 2 | import { Navigate } from "react-router-dom"; 3 | import axios from 'axios' 4 | export default function SignupPage() { 5 | const [username, setUsername] = useState('') 6 | const [password, setPassword] = useState('') 7 | const [email, setEmail] = useState('') 8 | const [redirect, setRedirect] = useState(false) 9 | const [error, setError] = useState('') 10 | 11 | const handleSubmit = async(e)=>{ 12 | e.preventDefault() 13 | try{ 14 | 15 | const res = await axios.post('/auth/signup',{ 16 | username, 17 | password, 18 | email, 19 | }) 20 | res.data&&window.location.replace('/login') 21 | setRedirect(true) 22 | } 23 | catch(err){ 24 | console.log(err) 25 | setError('Signup Failed') 26 | } 27 | } 28 | 29 | 30 | return ( 31 |
32 |

Sign Up

33 |
34 | setUsername(e.target.value)} placeholder="Username" /> 35 | setEmail(e.target.value)} placeholder="Email" /> 36 | setPassword(e.target.value)} placeholder="Password" /> 37 | 38 |
39 |

{error}

40 |
41 | ) 42 | } 43 | -------------------------------------------------------------------------------- /public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 12 | 13 | 17 | 18 | 27 | React App 28 | 29 | 30 | 31 |
32 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /server.js: -------------------------------------------------------------------------------- 1 | const express = require('express'); 2 | require('dotenv').config(); 3 | const path = require('path'); 4 | const multer = require('multer'); 5 | const favicon = require('serve-favicon'); 6 | const logger = require('morgan'); 7 | 8 | 9 | const app = express() 10 | const PORT = process.env.PORT || 3001; 11 | 12 | const connectDB = require('./utils/connectDB') 13 | const authRoute = require('./routes/auth') 14 | const postRoute = require('./routes/posts') 15 | // //===================================================== 16 | // **Middleware 17 | app.use(logger('dev'));//allows you to see information when a request is made 18 | app.use(express.json());// parses incoming requests to JSON 19 | 20 | // Configure both serve-favicon & static middleware 21 | // to serve from the production 'build' folder 22 | app.use(favicon(path.join(__dirname, 'build', 'favicon.ico'))); 23 | app.use(express.static(path.join(__dirname, 'build'))); 24 | // //===================================================== 25 | app.use('/', (req, res) => { 26 | console.log('Working') 27 | }) 28 | 29 | // //Image Upload 30 | const storage = multer.diskStorage({ 31 | destination: (req, file, cb) => { 32 | cb(null, 'images') 33 | }, filename: (req, file, cb) => { 34 | cb(null, req.body.name) 35 | } 36 | }) 37 | const upload = multer({ storage: storage }) 38 | app.post('/api/upload', upload.single('file'), (req, res) => { 39 | res.status(200).json('File has been uploaded') 40 | }) 41 | 42 | app.use('/api/auth', authRoute) 43 | app.use('/api/post', postRoute) 44 | 45 | // *Catch all Route 46 | // The following "catch all" route (note the *) is necessary 47 | // to return the index.html on all non-AJAX requests 48 | app.get('/*', function(req, res) { 49 | res.sendFile(path.join(__dirname, 'build', 'index.html')); 50 | }); 51 | // //===================================================== 52 | // **Database 53 | connectDB() 54 | // //===================================================== 55 | // **Listener 56 | app.listen(PORT, () => { 57 | console.log(`Express is listening on port :${PORT}`) 58 | }) -------------------------------------------------------------------------------- /routes/posts.js: -------------------------------------------------------------------------------- 1 | const router = require('express').Router() 2 | const User = require('../models/User') 3 | const Post = require('../models/Post') 4 | 5 | // //Get All Post 6 | router.get('/', async (req, res) => { 7 | console.log(req.params) 8 | try { 9 | const posts = await Post.find({}).sort({ updatedAt: "desc" }) 10 | res.status(200).json(posts) 11 | } catch (err) { 12 | res.status(500).json(err) 13 | } 14 | }) 15 | // //Create Post 16 | router.post('/:id', async (req, res) => { 17 | const newPost = new Post(req.body); 18 | try { 19 | const savedPost = await newPost.save() 20 | res.status(200).json(savedPost) 21 | } catch (err) { 22 | res.status(400).json(err) 23 | } 24 | }) 25 | // //Get Post 26 | router.get('/:id', async (req, res) => { 27 | console.log(req.params) 28 | try { 29 | const post = await Post.findById(req.params.id) 30 | res.status(200).json(post) 31 | } catch (err) { 32 | res.status(500).json(err) 33 | } 34 | }) 35 | // //Update Post 36 | router.put('/:id', async (req, res) => { 37 | try { 38 | const post = await Post.findById(req.params.id) 39 | if (post.username === req.body.username) { 40 | try { 41 | const updatedPost = await Post.findByIdAndUpdate(req.params.id, { 42 | $set: req.body, 43 | }, { new: true }); 44 | res.status(200).res.json(updatedPost) 45 | } catch (err) { 46 | req.status(500).json(err) 47 | } 48 | } else { 49 | res.status(401).json('You can only update posts you created') 50 | 51 | } 52 | 53 | } catch (err) { 54 | req.status(500).json(err) 55 | } 56 | }) 57 | // //Delete Post 58 | router.delete('/:id', async (req, res) => { 59 | try { 60 | const post = await Post.findById(req.params.id) 61 | if (post.username === req.body.username) { 62 | try { 63 | await post.delete() 64 | res.status(200).res.json('Post has been deleted') 65 | } catch (err) { 66 | req.status(500).json(err) 67 | } 68 | } else { 69 | res.status(401).json('You can onloy delete posts you created') 70 | 71 | } 72 | 73 | } catch (err) { 74 | req.status(500).json(err) 75 | } 76 | }) 77 | module.exports = router; -------------------------------------------------------------------------------- /src/App.css: -------------------------------------------------------------------------------- 1 | *{ 2 | margin:0; 3 | padding: 0; 4 | } 5 | body{ 6 | color: #e76f51; 7 | background-color:#e9c46a; 8 | } 9 | h1{ 10 | color: inherit; 11 | font-weight: 700px; 12 | margin: 10px; 13 | text-shadow: 2px 2px 2px #264653; 14 | } 15 | /* //Navbar */ 16 | .top{ 17 | width: 100%; 18 | height: 50px; 19 | background-color: #264653; 20 | position: sticky; 21 | top: 0; 22 | } 23 | .list{ 24 | display: flex; 25 | justify-content: space-around; 26 | align-items: center; 27 | } 28 | .list a{ 29 | color: #e9c46a; 30 | text-decoration: none; 31 | list-style-type: none; 32 | font-weight: 700; 33 | transition: 0.3s; 34 | cursor: pointer; 35 | margin: 10px; 36 | } 37 | .list a:hover{ 38 | font-size: 1.3rem 39 | } 40 | /* //Post */ 41 | div.post{ 42 | display: grid; 43 | grid-template-columns:0.9fr 1.1fr; 44 | gap: 20px; 45 | margin-bottom: 30px; 46 | } 47 | .texts h2{ 48 | margin: 0; 49 | font-size: 2rem; 50 | text-shadow: 1.5px 1px 2px #003049; 51 | } 52 | 53 | div.post div.texts a { 54 | text-decoration:none; 55 | color: inherit; 56 | } 57 | 58 | .info{ 59 | margin: 7px 0; 60 | color:#0030494f; 61 | font-size: 0.9rem; 62 | font-weight: bold; 63 | display: flex; 64 | } 65 | 66 | .author{ 67 | color: #003049af; 68 | cursor: pointer; 69 | } 70 | .summary{ 71 | margin: 6px 0; 72 | line-height: 1.3rem; 73 | } 74 | img{ 75 | width: 100%; 76 | height: 280px; 77 | object-fit: cover; 78 | border-radius: 10px; 79 | } 80 | .icon{ 81 | font-size: 15px; 82 | margin: 5px; 83 | border-radius: 10px; 84 | background-color:#e76f51; 85 | } 86 | .icon:nth-of-type(1){ 87 | background-color:#606c38; 88 | color: white; 89 | } 90 | /* //Forms */ 91 | .heading{ 92 | cursor: pointer; 93 | text-align: center; 94 | } 95 | .login .register{ 96 | max-width: 400px; 97 | margin: 0 auto; 98 | } 99 | input{ 100 | display: block; 101 | margin-bottom: 5px; 102 | width: 100%; 103 | padding: 20px; 104 | border: 0; 105 | border-radius: 10px; 106 | } 107 | button{ 108 | width: 100%; 109 | display: block; 110 | background-color: transparent; 111 | border: none; 112 | font-size: 1.5rem; 113 | font-weight: 600; 114 | color: #2a9d8f; 115 | cursor: pointer; 116 | } 117 | 118 | .error-message{ 119 | font-weight: bolder; 120 | font-size: 30px; 121 | opacity: 0.70; 122 | text-align: center; 123 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Getting Started with Create React App 2 | 3 | This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app). 4 | 5 | ## Available Scripts 6 | 7 | In the project directory, you can run: 8 | 9 | ### `npm start` 10 | 11 | Runs the app in the development mode.\ 12 | Open [http://localhost:3000](http://localhost:3000) to view it in your browser. 13 | 14 | The page will reload when you make changes.\ 15 | You may also see any lint errors in the console. 16 | 17 | ### `npm test` 18 | 19 | Launches the test runner in the interactive watch mode.\ 20 | See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information. 21 | 22 | ### `npm run build` 23 | 24 | Builds the app for production to the `build` folder.\ 25 | It correctly bundles React in production mode and optimizes the build for the best performance. 26 | 27 | The build is minified and the filenames include the hashes.\ 28 | Your app is ready to be deployed! 29 | 30 | See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information. 31 | 32 | ### `npm run eject` 33 | 34 | **Note: this is a one-way operation. Once you `eject`, you can't go back!** 35 | 36 | If you aren't satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project. 37 | 38 | Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you're on your own. 39 | 40 | You don't have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn't feel obligated to use this feature. However we understand that this tool wouldn't be useful if you couldn't customize it when you are ready for it. 41 | 42 | ## Learn More 43 | 44 | You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started). 45 | 46 | To learn React, check out the [React documentation](https://reactjs.org/). 47 | 48 | ### Code Splitting 49 | 50 | This section has moved here: [https://facebook.github.io/create-react-app/docs/code-splitting](https://facebook.github.io/create-react-app/docs/code-splitting) 51 | 52 | ### Analyzing the Bundle Size 53 | 54 | This section has moved here: [https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size](https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size) 55 | 56 | ### Making a Progressive Web App 57 | 58 | This section has moved here: [https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app](https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app) 59 | 60 | ### Advanced Configuration 61 | 62 | This section has moved here: [https://facebook.github.io/create-react-app/docs/advanced-configuration](https://facebook.github.io/create-react-app/docs/advanced-configuration) 63 | 64 | ### Deployment 65 | 66 | This section has moved here: [https://facebook.github.io/create-react-app/docs/deployment](https://facebook.github.io/create-react-app/docs/deployment) 67 | 68 | ### `npm run build` fails to minify 69 | 70 | This section has moved here: [https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify](https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify) 71 | --------------------------------------------------------------------------------