├── .gitignore
├── client
├── src
│ ├── style
│ │ └── index.js
│ ├── components
│ │ ├── index.js
│ │ ├── Logo.jsx
│ │ ├── NavBar.jsx
│ │ └── Links.jsx
│ ├── index.js
│ ├── pages
│ │ ├── index.js
│ │ ├── MoviesInsert.jsx
│ │ ├── MoviesUpdate.jsx
│ │ └── MoviesList.jsx
│ ├── api
│ │ └── index.js
│ ├── app
│ │ └── index.js
│ └── logo.svg
├── public
│ ├── favicon.ico
│ ├── manifest.json
│ └── index.html
├── .gitignore
├── package.json
└── README.md
├── server
├── package.json
├── db
│ └── index.js
├── models
│ └── movie-model.js
├── routes
│ └── movie-router.js
├── index.js
├── controllers
│ └── movie-ctrl.js
└── yarn.lock
└── README.md
/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
--------------------------------------------------------------------------------
/client/src/style/index.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/client/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/samaronybarros/movies-app/HEAD/client/public/favicon.ico
--------------------------------------------------------------------------------
/client/src/components/index.js:
--------------------------------------------------------------------------------
1 | import Links from './Links'
2 | import Logo from './Logo'
3 | import NavBar from './NavBar'
4 |
5 | export { Links, Logo, NavBar }
6 |
--------------------------------------------------------------------------------
/client/src/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import ReactDOM from 'react-dom'
3 | import App from './app'
4 |
5 | ReactDOM.render(, document.getElementById('root'))
6 |
--------------------------------------------------------------------------------
/client/src/pages/index.js:
--------------------------------------------------------------------------------
1 | import MoviesList from './MoviesList'
2 | import MoviesInsert from './MoviesInsert'
3 | import MoviesUpdate from './MoviesUpdate'
4 |
5 | export { MoviesList, MoviesInsert, MoviesUpdate }
6 |
--------------------------------------------------------------------------------
/server/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "server",
3 | "version": "1.0.0",
4 | "main": "index.js",
5 | "license": "MIT",
6 | "dependencies": {
7 | "body-parser": "^1.19.0",
8 | "cors": "^2.8.5",
9 | "express": "^4.16.4",
10 | "mongoose": "^5.7.5"
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/server/db/index.js:
--------------------------------------------------------------------------------
1 | const mongoose = require('mongoose')
2 |
3 | mongoose
4 | .connect('mongodb://127.0.0.1:27017/cinema', { useNewUrlParser: true })
5 | .catch(e => {
6 | console.error('Connection error', e.message)
7 | })
8 |
9 | const db = mongoose.connection
10 |
11 | module.exports = db
12 |
--------------------------------------------------------------------------------
/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": "64x64 32x32 24x24 16x16",
8 | "type": "image/x-icon"
9 | }
10 | ],
11 | "start_url": ".",
12 | "display": "standalone",
13 | "theme_color": "#000000",
14 | "background_color": "#ffffff"
15 | }
16 |
--------------------------------------------------------------------------------
/server/models/movie-model.js:
--------------------------------------------------------------------------------
1 | const mongoose = require('mongoose')
2 | const Schema = mongoose.Schema
3 |
4 | const Movie = new Schema(
5 | {
6 | name: { type: String, required: true },
7 | time: { type: [String], required: true },
8 | rating: { type: Number, required: false },
9 | },
10 | { timestamps: true },
11 | )
12 |
13 | module.exports = mongoose.model('movies', Movie)
14 |
--------------------------------------------------------------------------------
/client/.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 |
8 | # testing
9 | /coverage
10 |
11 | # production
12 | /build
13 |
14 | # misc
15 | .DS_Store
16 | .env.local
17 | .env.development.local
18 | .env.test.local
19 | .env.production.local
20 |
21 | npm-debug.log*
22 | yarn-debug.log*
23 | yarn-error.log*
24 |
--------------------------------------------------------------------------------
/server/routes/movie-router.js:
--------------------------------------------------------------------------------
1 | const express = require('express')
2 |
3 | const MovieCtrl = require('../controllers/movie-ctrl')
4 |
5 | const router = express.Router()
6 |
7 | router.post('/movie', MovieCtrl.createMovie)
8 | router.put('/movie/:id', MovieCtrl.updateMovie)
9 | router.delete('/movie/:id', MovieCtrl.deleteMovie)
10 | router.get('/movie/:id', MovieCtrl.getMovieById)
11 | router.get('/movies', MovieCtrl.getMovies)
12 |
13 | module.exports = router
14 |
--------------------------------------------------------------------------------
/client/src/components/Logo.jsx:
--------------------------------------------------------------------------------
1 | import React, { Component } from 'react'
2 | import styled from 'styled-components'
3 |
4 | import logo from '../logo.svg'
5 |
6 | const Wrapper = styled.a.attrs({
7 | className: 'navbar-brand',
8 | })``
9 |
10 | class Logo extends Component {
11 | render() {
12 | return (
13 |
14 |
15 |
16 | )
17 | }
18 | }
19 |
20 | export default Logo
21 |
--------------------------------------------------------------------------------
/client/src/api/index.js:
--------------------------------------------------------------------------------
1 | import axios from 'axios'
2 |
3 | const api = axios.create({
4 | baseURL: 'http://localhost:3000/api',
5 | })
6 |
7 | export const insertMovie = payload => api.post(`/movie`, payload)
8 | export const getAllMovies = () => api.get(`/movies`)
9 | export const updateMovieById = (id, payload) => api.put(`/movie/${id}`, payload)
10 | export const deleteMovieById = id => api.delete(`/movie/${id}`)
11 | export const getMovieById = id => api.get(`/movie/${id}`)
12 |
13 | const apis = {
14 | insertMovie,
15 | getAllMovies,
16 | updateMovieById,
17 | deleteMovieById,
18 | getMovieById,
19 | }
20 |
21 | export default apis
22 |
--------------------------------------------------------------------------------
/server/index.js:
--------------------------------------------------------------------------------
1 | const express = require('express')
2 | const bodyParser = require('body-parser')
3 | const cors = require('cors')
4 |
5 | const db = require('./db')
6 | const movieRouter = require('./routes/movie-router')
7 |
8 | const app = express()
9 | const apiPort = 3000
10 |
11 | app.use(bodyParser.urlencoded({ extended: true }))
12 | app.use(cors())
13 | app.use(bodyParser.json())
14 |
15 | db.on('error', console.error.bind(console, 'MongoDB connection error:'))
16 |
17 | app.get('/', (req, res) => {
18 | res.send('Hello World!')
19 | })
20 |
21 | app.use('/api', movieRouter)
22 |
23 | app.listen(apiPort, () => console.log(`Server running on port ${apiPort}`))
24 |
--------------------------------------------------------------------------------
/client/src/components/NavBar.jsx:
--------------------------------------------------------------------------------
1 | import React, { Component } from 'react'
2 | import styled from 'styled-components'
3 |
4 | import Logo from './Logo'
5 | import Links from './Links'
6 |
7 | const Container = styled.div.attrs({
8 | className: 'container',
9 | })`
10 | height: 150px;
11 | `
12 |
13 | const Nav = styled.nav.attrs({
14 | className: 'navbar navbar-expand-lg navbar-dark bg-dark',
15 | })`
16 | margin-bottom: 20 px;
17 | `
18 |
19 | class NavBar extends Component {
20 | render() {
21 | return (
22 |
23 |
27 |
28 | )
29 | }
30 | }
31 |
32 | export default NavBar
33 |
--------------------------------------------------------------------------------
/client/src/app/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react'
2 | import { BrowserRouter as Router, Route, Switch } from 'react-router-dom'
3 |
4 | import { NavBar } from '../components'
5 | import { MoviesList, MoviesInsert, MoviesUpdate } from '../pages'
6 |
7 | import 'bootstrap/dist/css/bootstrap.min.css'
8 |
9 | function App() {
10 | return (
11 |
12 |
13 |
14 |
15 |
16 |
21 |
22 |
23 | )
24 | }
25 |
26 | export default App
27 |
--------------------------------------------------------------------------------
/client/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "client",
3 | "version": "0.1.0",
4 | "private": true,
5 | "dependencies": {
6 | "axios": "^0.18.0",
7 | "bootstrap": "^4.3.1",
8 | "react": "^16.8.6",
9 | "react-dom": "^16.8.6",
10 | "react-router-dom": "^5.0.0",
11 | "react-scripts": "3.0.1",
12 | "react-table": "^6.10.0",
13 | "styled-components": "^4.2.0"
14 | },
15 | "scripts": {
16 | "start": "PORT=8000 react-scripts start",
17 | "build": "react-scripts build",
18 | "test": "react-scripts test",
19 | "eject": "react-scripts eject"
20 | },
21 | "eslintConfig": {
22 | "extends": "react-app"
23 | },
24 | "browserslist": {
25 | "production": [
26 | ">0.2%",
27 | "not dead",
28 | "not op_mini all"
29 | ],
30 | "development": [
31 | "last 1 chrome version",
32 | "last 1 firefox version",
33 | "last 1 safari version"
34 | ]
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/client/src/components/Links.jsx:
--------------------------------------------------------------------------------
1 | import React, { Component } from 'react'
2 | import { Link } from 'react-router-dom'
3 | import styled from 'styled-components'
4 |
5 | const Collapse = styled.div.attrs({
6 | className: 'collpase navbar-collapse',
7 | })``
8 |
9 | const List = styled.div.attrs({
10 | className: 'navbar-nav mr-auto',
11 | })``
12 |
13 | const Item = styled.div.attrs({
14 | className: 'collpase navbar-collapse',
15 | })``
16 |
17 | class Links extends Component {
18 | render() {
19 | return (
20 |
21 |
22 | My first MERN Application
23 |
24 |
25 |
26 | -
27 |
28 | List Movies
29 |
30 |
31 | -
32 |
33 | Create Movie
34 |
35 |
36 |
37 |
38 |
39 | )
40 | }
41 | }
42 |
43 | export default Links
44 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # movies-app
2 |
3 | # Introduction
4 |
5 | This repository is the result of the tutorial to develop your first MERN application and you can find it [here](https://medium.com/@samarony.barros/how-to-create-your-first-mern-mongodb-express-js-react-js-and-node-js-stack-7e8b20463e66)
6 |
7 | ## What you should install?
8 |
9 | For this project, I decided to use the MERN (MongoDB, Express.js, React.js, and Node.js) technology.
10 | 
11 |
12 | Firstly, you should install
13 |
14 | - [Mongo](https://www.mongodb.com/) 4.0.4+
15 | - [ExpressJS](https://expressjs.com/) 4.16.3+
16 | - [ReactJS](https://reactjs.org/) 16.5.0+
17 | - [Node](https://nodejs.org/en/) 11.4.0+ (It's recommended to use 10.15.1 LTS)
18 |
19 | ## Download
20 |
21 | You can download the folder on my [GitHub](https://github.com/samaronybarros/) or you can do this directly on [this link](https://github.com/samaronybarros/movies-app).
22 |
23 | If you have git installed on your PC, you just need do as follow:
24 |
25 | ```
26 | $ git clone https://github.com/samaronybarros/movies-app.git
27 | ```
28 |
29 | ## Configuring App
30 |
31 | If you have all the prerequisites installed you should verify if your MongoDB is up.
32 |
33 | ```
34 | $ cd movies-app
35 | $ cd server
36 | $ yarn install
37 | $ nodemon index.js
38 | ```
39 |
40 | ```
41 | $ cd movies-app
42 | $ cd client
43 | $ yarn install
44 | $ yarn start
45 | ```
46 |
--------------------------------------------------------------------------------
/client/public/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
12 |
13 |
22 | React App
23 |
24 |
25 |
26 |
27 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/client/src/logo.svg:
--------------------------------------------------------------------------------
1 |
8 |
--------------------------------------------------------------------------------
/client/README.md:
--------------------------------------------------------------------------------
1 | This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
2 |
3 | ## Available Scripts
4 |
5 | In the project directory, you can run:
6 |
7 | ### `npm start`
8 |
9 | Runs the app in the development mode.
10 | Open [http://localhost:3000](http://localhost:3000) to view it in the browser.
11 |
12 | The page will reload if you make edits.
13 | You will also see any lint errors in the console.
14 |
15 | ### `npm test`
16 |
17 | Launches the test runner in the interactive watch mode.
18 | See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.
19 |
20 | ### `npm run build`
21 |
22 | Builds the app for production to the `build` folder.
23 | It correctly bundles React in production mode and optimizes the build for the best performance.
24 |
25 | The build is minified and the filenames include the hashes.
26 | Your app is ready to be deployed!
27 |
28 | See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.
29 |
30 | ### `npm run eject`
31 |
32 | **Note: this is a one-way operation. Once you `eject`, you can’t go back!**
33 |
34 | 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.
35 |
36 | 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.
37 |
38 | 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.
39 |
40 | ## Learn More
41 |
42 | You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).
43 |
44 | To learn React, check out the [React documentation](https://reactjs.org/).
45 |
46 | ### Code Splitting
47 |
48 | This section has moved here: https://facebook.github.io/create-react-app/docs/code-splitting
49 |
50 | ### Analyzing the Bundle Size
51 |
52 | This section has moved here: https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size
53 |
54 | ### Making a Progressive Web App
55 |
56 | This section has moved here: https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app
57 |
58 | ### Advanced Configuration
59 |
60 | This section has moved here: https://facebook.github.io/create-react-app/docs/advanced-configuration
61 |
62 | ### Deployment
63 |
64 | This section has moved here: https://facebook.github.io/create-react-app/docs/deployment
65 |
66 | ### `npm run build` fails to minify
67 |
68 | This section has moved here: https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify
69 |
--------------------------------------------------------------------------------
/client/src/pages/MoviesInsert.jsx:
--------------------------------------------------------------------------------
1 | import React, { Component } from 'react'
2 | import api from '../api'
3 |
4 | import styled from 'styled-components'
5 |
6 | const Title = styled.h1.attrs({
7 | className: 'h1',
8 | })``
9 |
10 | const Wrapper = styled.div.attrs({
11 | className: 'form-group',
12 | })`
13 | margin: 0 30px;
14 | `
15 |
16 | const Label = styled.label`
17 | margin: 5px;
18 | `
19 |
20 | const InputText = styled.input.attrs({
21 | className: 'form-control',
22 | })`
23 | margin: 5px;
24 | `
25 |
26 | const Button = styled.button.attrs({
27 | className: `btn btn-primary`,
28 | })`
29 | margin: 15px 15px 15px 5px;
30 | `
31 |
32 | const CancelButton = styled.a.attrs({
33 | className: `btn btn-danger`,
34 | })`
35 | margin: 15px 15px 15px 5px;
36 | `
37 |
38 | class MoviesInsert extends Component {
39 | constructor(props) {
40 | super(props)
41 |
42 | this.state = {
43 | name: '',
44 | rating: '',
45 | time: '',
46 | }
47 | }
48 |
49 | handleChangeInputName = async event => {
50 | const name = event.target.value
51 | this.setState({ name })
52 | }
53 |
54 | handleChangeInputRating = async event => {
55 | const rating = event.target.validity.valid
56 | ? event.target.value
57 | : this.state.rating
58 |
59 | this.setState({ rating })
60 | }
61 |
62 | handleChangeInputTime = async event => {
63 | const time = event.target.value
64 | this.setState({ time })
65 | }
66 |
67 | handleIncludeMovie = async () => {
68 | const { name, rating, time } = this.state
69 | const arrayTime = time.split('/')
70 | const payload = { name, rating, time: arrayTime }
71 |
72 | await api.insertMovie(payload).then(res => {
73 | window.alert(`Movie inserted successfully`)
74 | this.setState({
75 | name: '',
76 | rating: '',
77 | time: '',
78 | })
79 | })
80 | }
81 |
82 | render() {
83 | const { name, rating, time } = this.state
84 | return (
85 |
86 | Create Movie
87 |
88 |
89 |
94 |
95 |
96 |
106 |
107 |
108 |
113 |
114 |
115 | Cancel
116 |
117 | )
118 | }
119 | }
120 |
121 | export default MoviesInsert
122 |
--------------------------------------------------------------------------------
/server/controllers/movie-ctrl.js:
--------------------------------------------------------------------------------
1 | const Movie = require('../models/movie-model')
2 |
3 | createMovie = (req, res) => {
4 | const body = req.body
5 |
6 | if (!body) {
7 | return res.status(400).json({
8 | success: false,
9 | error: 'You must provide a movie',
10 | })
11 | }
12 |
13 | const movie = new Movie(body)
14 |
15 | if (!movie) {
16 | return res.status(400).json({ success: false, error: err })
17 | }
18 |
19 | movie
20 | .save()
21 | .then(() => {
22 | return res.status(201).json({
23 | success: true,
24 | id: movie._id,
25 | message: 'Movie created!',
26 | })
27 | })
28 | .catch(error => {
29 | return res.status(400).json({
30 | error,
31 | message: 'Movie not created!',
32 | })
33 | })
34 | }
35 |
36 | updateMovie = async (req, res) => {
37 | const body = req.body
38 |
39 | if (!body) {
40 | return res.status(400).json({
41 | success: false,
42 | error: 'You must provide a body to update',
43 | })
44 | }
45 |
46 | Movie.findOne({ _id: req.params.id }, (err, movie) => {
47 | if (err) {
48 | return res.status(404).json({
49 | err,
50 | message: 'Movie not found!',
51 | })
52 | }
53 | movie.name = body.name
54 | movie.time = body.time
55 | movie.rating = body.rating
56 | movie
57 | .save()
58 | .then(() => {
59 | return res.status(200).json({
60 | success: true,
61 | id: movie._id,
62 | message: 'Movie updated!',
63 | })
64 | })
65 | .catch(error => {
66 | return res.status(404).json({
67 | error,
68 | message: 'Movie not updated!',
69 | })
70 | })
71 | })
72 | }
73 |
74 | deleteMovie = async (req, res) => {
75 | await Movie.findOneAndDelete({ _id: req.params.id }, (err, movie) => {
76 | if (err) {
77 | return res.status(400).json({ success: false, error: err })
78 | }
79 |
80 | if (!movie) {
81 | return res
82 | .status(404)
83 | .json({ success: false, error: `Movie not found` })
84 | }
85 |
86 | return res.status(200).json({ success: true, data: movie })
87 | }).catch(err => console.log(err))
88 | }
89 |
90 | getMovieById = async (req, res) => {
91 | await Movie.findOne({ _id: req.params.id }, (err, movie) => {
92 | if (err) {
93 | return res.status(400).json({ success: false, error: err })
94 | }
95 |
96 | return res.status(200).json({ success: true, data: movie })
97 | }).catch(err => console.log(err))
98 | }
99 |
100 | getMovies = async (req, res) => {
101 | await Movie.find({}, (err, movies) => {
102 | if (err) {
103 | return res.status(400).json({ success: false, error: err })
104 | }
105 | if (!movies.length) {
106 | return res
107 | .status(404)
108 | .json({ success: false, error: `Movie not found` })
109 | }
110 | return res.status(200).json({ success: true, data: movies })
111 | }).catch(err => console.log(err))
112 | }
113 |
114 | module.exports = {
115 | createMovie,
116 | updateMovie,
117 | deleteMovie,
118 | getMovies,
119 | getMovieById,
120 | }
121 |
--------------------------------------------------------------------------------
/client/src/pages/MoviesUpdate.jsx:
--------------------------------------------------------------------------------
1 | import React, { Component } from 'react'
2 | import api from '../api'
3 |
4 | import styled from 'styled-components'
5 |
6 | const Title = styled.h1.attrs({
7 | className: 'h1',
8 | })``
9 |
10 | const Wrapper = styled.div.attrs({
11 | className: 'form-group',
12 | })`
13 | margin: 0 30px;
14 | `
15 |
16 | const Label = styled.label`
17 | margin: 5px;
18 | `
19 |
20 | const InputText = styled.input.attrs({
21 | className: 'form-control',
22 | })`
23 | margin: 5px;
24 | `
25 |
26 | const Button = styled.button.attrs({
27 | className: `btn btn-primary`,
28 | })`
29 | margin: 15px 15px 15px 5px;
30 | `
31 |
32 | const CancelButton = styled.a.attrs({
33 | className: `btn btn-danger`,
34 | })`
35 | margin: 15px 15px 15px 5px;
36 | `
37 |
38 | class MoviesUpdate extends Component {
39 | constructor(props) {
40 | super(props)
41 |
42 | this.state = {
43 | id: this.props.match.params.id,
44 | name: '',
45 | rating: '',
46 | time: '',
47 | }
48 | }
49 |
50 | handleChangeInputName = async event => {
51 | const name = event.target.value
52 | this.setState({ name })
53 | }
54 |
55 | handleChangeInputRating = async event => {
56 | const rating = event.target.validity.valid
57 | ? event.target.value
58 | : this.state.rating
59 |
60 | this.setState({ rating })
61 | }
62 |
63 | handleChangeInputTime = async event => {
64 | const time = event.target.value
65 | this.setState({ time })
66 | }
67 |
68 | handleUpdateMovie = async () => {
69 | const { id, name, rating, time } = this.state
70 | const arrayTime = time.split('/')
71 | const payload = { name, rating, time: arrayTime }
72 |
73 | await api.updateMovieById(id, payload).then(res => {
74 | window.alert(`Movie updated successfully`)
75 | this.setState({
76 | name: '',
77 | rating: '',
78 | time: '',
79 | })
80 | })
81 | }
82 |
83 | componentDidMount = async () => {
84 | const { id } = this.state
85 | const movie = await api.getMovieById(id)
86 |
87 | this.setState({
88 | name: movie.data.data.name,
89 | rating: movie.data.data.rating,
90 | time: movie.data.data.time.join('/'),
91 | })
92 | }
93 |
94 | render() {
95 | const { name, rating, time } = this.state
96 | return (
97 |
98 | Create Movie
99 |
100 |
101 |
106 |
107 |
108 |
118 |
119 |
120 |
125 |
126 |
127 | Cancel
128 |
129 | )
130 | }
131 | }
132 |
133 | export default MoviesUpdate
134 |
--------------------------------------------------------------------------------
/client/src/pages/MoviesList.jsx:
--------------------------------------------------------------------------------
1 | import React, { Component } from 'react'
2 | import ReactTable from 'react-table'
3 | import api from '../api'
4 |
5 | import styled from 'styled-components'
6 |
7 | import 'react-table/react-table.css'
8 |
9 | const Wrapper = styled.div`
10 | padding: 0 40px 40px 40px;
11 | `
12 |
13 | const Update = styled.div`
14 | color: #ef9b0f;
15 | cursor: pointer;
16 | `
17 |
18 | const Delete = styled.div`
19 | color: #ff0000;
20 | cursor: pointer;
21 | `
22 |
23 | class UpdateMovie extends Component {
24 | updateUser = event => {
25 | event.preventDefault()
26 |
27 | window.location.href = `/movies/update/${this.props.id}`
28 | }
29 |
30 | render() {
31 | return Update
32 | }
33 | }
34 |
35 | class DeleteMovie extends Component {
36 | deleteUser = event => {
37 | event.preventDefault()
38 |
39 | if (
40 | window.confirm(
41 | `Do tou want to delete the movie ${this.props.id} permanently?`,
42 | )
43 | ) {
44 | api.deleteMovieById(this.props.id)
45 | window.location.reload()
46 | }
47 | }
48 |
49 | render() {
50 | return Delete
51 | }
52 | }
53 |
54 | class MoviesList extends Component {
55 | constructor(props) {
56 | super(props)
57 | this.state = {
58 | movies: [],
59 | columns: [],
60 | isLoading: false,
61 | }
62 | }
63 |
64 | componentDidMount = async () => {
65 | this.setState({ isLoading: true })
66 |
67 | await api.getAllMovies().then(movies => {
68 | this.setState({
69 | movies: movies.data.data,
70 | isLoading: false,
71 | })
72 | })
73 | }
74 |
75 | render() {
76 | const { movies, isLoading } = this.state
77 |
78 | const columns = [
79 | {
80 | Header: 'ID',
81 | accessor: '_id',
82 | filterable: true,
83 | },
84 | {
85 | Header: 'Name',
86 | accessor: 'name',
87 | filterable: true,
88 | },
89 | {
90 | Header: 'Rating',
91 | accessor: 'rating',
92 | filterable: true,
93 | },
94 | {
95 | Header: 'Time',
96 | accessor: 'time',
97 | Cell: props => {props.value.join(' / ')},
98 | },
99 | {
100 | Header: '',
101 | accessor: '',
102 | Cell: function(props) {
103 | return (
104 |
105 |
106 |
107 | )
108 | },
109 | },
110 | {
111 | Header: '',
112 | accessor: '',
113 | Cell: function(props) {
114 | return (
115 |
116 |
117 |
118 | )
119 | },
120 | },
121 | ]
122 |
123 | let showTable = true
124 | if (!movies.length) {
125 | showTable = false
126 | }
127 |
128 | return (
129 |
130 | {showTable && (
131 |
139 | )}
140 |
141 | )
142 | }
143 | }
144 |
145 | export default MoviesList
146 |
--------------------------------------------------------------------------------
/server/yarn.lock:
--------------------------------------------------------------------------------
1 | # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
2 | # yarn lockfile v1
3 |
4 |
5 | accepts@~1.3.5:
6 | version "1.3.7"
7 | resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.7.tgz#531bc726517a3b2b41f850021c6cc15eaab507cd"
8 | integrity sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA==
9 | dependencies:
10 | mime-types "~2.1.24"
11 | negotiator "0.6.2"
12 |
13 | array-flatten@1.1.1:
14 | version "1.1.1"
15 | resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-1.1.1.tgz#9a5f699051b1e7073328f2a008968b64ea2955d2"
16 | integrity sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=
17 |
18 | bluebird@3.5.1:
19 | version "3.5.1"
20 | resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.5.1.tgz#d9551f9de98f1fcda1e683d17ee91a0602ee2eb9"
21 | integrity sha512-MKiLiV+I1AA596t9w1sQJ8jkiSr5+ZKi0WKrYGUn6d1Fx+Ij4tIj+m2WMQSGczs5jZVxV339chE8iwk6F64wjA==
22 |
23 | body-parser@1.18.3:
24 | version "1.18.3"
25 | resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.18.3.tgz#5b292198ffdd553b3a0f20ded0592b956955c8b4"
26 | integrity sha1-WykhmP/dVTs6DyDe0FkrlWlVyLQ=
27 | dependencies:
28 | bytes "3.0.0"
29 | content-type "~1.0.4"
30 | debug "2.6.9"
31 | depd "~1.1.2"
32 | http-errors "~1.6.3"
33 | iconv-lite "0.4.23"
34 | on-finished "~2.3.0"
35 | qs "6.5.2"
36 | raw-body "2.3.3"
37 | type-is "~1.6.16"
38 |
39 | body-parser@^1.19.0:
40 | version "1.19.0"
41 | resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.19.0.tgz#96b2709e57c9c4e09a6fd66a8fd979844f69f08a"
42 | integrity sha512-dhEPs72UPbDnAQJ9ZKMNTP6ptJaionhP5cBb541nXPlW60Jepo9RV/a4fX4XWW9CuFNK22krhrj1+rgzifNCsw==
43 | dependencies:
44 | bytes "3.1.0"
45 | content-type "~1.0.4"
46 | debug "2.6.9"
47 | depd "~1.1.2"
48 | http-errors "1.7.2"
49 | iconv-lite "0.4.24"
50 | on-finished "~2.3.0"
51 | qs "6.7.0"
52 | raw-body "2.4.0"
53 | type-is "~1.6.17"
54 |
55 | bson@^1.1.1, bson@~1.1.1:
56 | version "1.1.1"
57 | resolved "https://registry.yarnpkg.com/bson/-/bson-1.1.1.tgz#4330f5e99104c4e751e7351859e2d408279f2f13"
58 | integrity sha512-jCGVYLoYMHDkOsbwJZBCqwMHyH4c+wzgI9hG7Z6SZJRXWr+x58pdIbm2i9a/jFGCkRJqRUr8eoI7lDWa0hTkxg==
59 |
60 | bytes@3.0.0:
61 | version "3.0.0"
62 | resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.0.0.tgz#d32815404d689699f85a4ea4fa8755dd13a96048"
63 | integrity sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg=
64 |
65 | bytes@3.1.0:
66 | version "3.1.0"
67 | resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.0.tgz#f6cf7933a360e0588fa9fde85651cdc7f805d1f6"
68 | integrity sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg==
69 |
70 | content-disposition@0.5.2:
71 | version "0.5.2"
72 | resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-0.5.2.tgz#0cf68bb9ddf5f2be7961c3a85178cb85dba78cb4"
73 | integrity sha1-DPaLud318r55YcOoUXjLhdunjLQ=
74 |
75 | content-type@~1.0.4:
76 | version "1.0.4"
77 | resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.4.tgz#e138cc75e040c727b1966fe5e5f8c9aee256fe3b"
78 | integrity sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==
79 |
80 | cookie-signature@1.0.6:
81 | version "1.0.6"
82 | resolved "https://registry.yarnpkg.com/cookie-signature/-/cookie-signature-1.0.6.tgz#e303a882b342cc3ee8ca513a79999734dab3ae2c"
83 | integrity sha1-4wOogrNCzD7oylE6eZmXNNqzriw=
84 |
85 | cookie@0.3.1:
86 | version "0.3.1"
87 | resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.3.1.tgz#e7e0a1f9ef43b4c8ba925c5c5a96e806d16873bb"
88 | integrity sha1-5+Ch+e9DtMi6klxcWpboBtFoc7s=
89 |
90 | cors@^2.8.5:
91 | version "2.8.5"
92 | resolved "https://registry.yarnpkg.com/cors/-/cors-2.8.5.tgz#eac11da51592dd86b9f06f6e7ac293b3df875d29"
93 | integrity sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==
94 | dependencies:
95 | object-assign "^4"
96 | vary "^1"
97 |
98 | debug@2.6.9:
99 | version "2.6.9"
100 | resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f"
101 | integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==
102 | dependencies:
103 | ms "2.0.0"
104 |
105 | debug@3.1.0:
106 | version "3.1.0"
107 | resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261"
108 | integrity sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==
109 | dependencies:
110 | ms "2.0.0"
111 |
112 | depd@~1.1.2:
113 | version "1.1.2"
114 | resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.2.tgz#9bcd52e14c097763e749b274c4346ed2e560b5a9"
115 | integrity sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=
116 |
117 | destroy@~1.0.4:
118 | version "1.0.4"
119 | resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.0.4.tgz#978857442c44749e4206613e37946205826abd80"
120 | integrity sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=
121 |
122 | ee-first@1.1.1:
123 | version "1.1.1"
124 | resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d"
125 | integrity sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=
126 |
127 | encodeurl@~1.0.2:
128 | version "1.0.2"
129 | resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59"
130 | integrity sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=
131 |
132 | escape-html@~1.0.3:
133 | version "1.0.3"
134 | resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988"
135 | integrity sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=
136 |
137 | etag@~1.8.1:
138 | version "1.8.1"
139 | resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887"
140 | integrity sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=
141 |
142 | express@^4.16.4:
143 | version "4.16.4"
144 | resolved "https://registry.yarnpkg.com/express/-/express-4.16.4.tgz#fddef61926109e24c515ea97fd2f1bdbf62df12e"
145 | integrity sha512-j12Uuyb4FMrd/qQAm6uCHAkPtO8FDTRJZBDd5D2KOL2eLaz1yUNdUB/NOIyq0iU4q4cFarsUCrnFDPBcnksuOg==
146 | dependencies:
147 | accepts "~1.3.5"
148 | array-flatten "1.1.1"
149 | body-parser "1.18.3"
150 | content-disposition "0.5.2"
151 | content-type "~1.0.4"
152 | cookie "0.3.1"
153 | cookie-signature "1.0.6"
154 | debug "2.6.9"
155 | depd "~1.1.2"
156 | encodeurl "~1.0.2"
157 | escape-html "~1.0.3"
158 | etag "~1.8.1"
159 | finalhandler "1.1.1"
160 | fresh "0.5.2"
161 | merge-descriptors "1.0.1"
162 | methods "~1.1.2"
163 | on-finished "~2.3.0"
164 | parseurl "~1.3.2"
165 | path-to-regexp "0.1.7"
166 | proxy-addr "~2.0.4"
167 | qs "6.5.2"
168 | range-parser "~1.2.0"
169 | safe-buffer "5.1.2"
170 | send "0.16.2"
171 | serve-static "1.13.2"
172 | setprototypeof "1.1.0"
173 | statuses "~1.4.0"
174 | type-is "~1.6.16"
175 | utils-merge "1.0.1"
176 | vary "~1.1.2"
177 |
178 | finalhandler@1.1.1:
179 | version "1.1.1"
180 | resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.1.1.tgz#eebf4ed840079c83f4249038c9d703008301b105"
181 | integrity sha512-Y1GUDo39ez4aHAw7MysnUD5JzYX+WaIj8I57kO3aEPT1fFRL4sr7mjei97FgnwhAyyzRYmQZaTHb2+9uZ1dPtg==
182 | dependencies:
183 | debug "2.6.9"
184 | encodeurl "~1.0.2"
185 | escape-html "~1.0.3"
186 | on-finished "~2.3.0"
187 | parseurl "~1.3.2"
188 | statuses "~1.4.0"
189 | unpipe "~1.0.0"
190 |
191 | forwarded@~0.1.2:
192 | version "0.1.2"
193 | resolved "https://registry.yarnpkg.com/forwarded/-/forwarded-0.1.2.tgz#98c23dab1175657b8c0573e8ceccd91b0ff18c84"
194 | integrity sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ=
195 |
196 | fresh@0.5.2:
197 | version "0.5.2"
198 | resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7"
199 | integrity sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=
200 |
201 | http-errors@1.6.3, http-errors@~1.6.2, http-errors@~1.6.3:
202 | version "1.6.3"
203 | resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.6.3.tgz#8b55680bb4be283a0b5bf4ea2e38580be1d9320d"
204 | integrity sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0=
205 | dependencies:
206 | depd "~1.1.2"
207 | inherits "2.0.3"
208 | setprototypeof "1.1.0"
209 | statuses ">= 1.4.0 < 2"
210 |
211 | http-errors@1.7.2:
212 | version "1.7.2"
213 | resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.7.2.tgz#4f5029cf13239f31036e5b2e55292bcfbcc85c8f"
214 | integrity sha512-uUQBt3H/cSIVfch6i1EuPNy/YsRSOUBXTVfZ+yR7Zjez3qjBz6i9+i4zjNaoqcoFVI4lQJ5plg63TvGfRSDCRg==
215 | dependencies:
216 | depd "~1.1.2"
217 | inherits "2.0.3"
218 | setprototypeof "1.1.1"
219 | statuses ">= 1.5.0 < 2"
220 | toidentifier "1.0.0"
221 |
222 | iconv-lite@0.4.23:
223 | version "0.4.23"
224 | resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.23.tgz#297871f63be507adcfbfca715d0cd0eed84e9a63"
225 | integrity sha512-neyTUVFtahjf0mB3dZT77u+8O0QB89jFdnBkd5P1JgYPbPaia3gXXOVL2fq8VyU2gMMD7SaN7QukTB/pmXYvDA==
226 | dependencies:
227 | safer-buffer ">= 2.1.2 < 3"
228 |
229 | iconv-lite@0.4.24:
230 | version "0.4.24"
231 | resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b"
232 | integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==
233 | dependencies:
234 | safer-buffer ">= 2.1.2 < 3"
235 |
236 | inherits@2.0.3:
237 | version "2.0.3"
238 | resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de"
239 | integrity sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=
240 |
241 | ipaddr.js@1.9.0:
242 | version "1.9.0"
243 | resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.9.0.tgz#37df74e430a0e47550fe54a2defe30d8acd95f65"
244 | integrity sha512-M4Sjn6N/+O6/IXSJseKqHoFc+5FdGJ22sXqnjTpdZweHK64MzEPAyQZyEU3R/KRv2GLoa7nNtg/C2Ev6m7z+eA==
245 |
246 | kareem@2.3.1:
247 | version "2.3.1"
248 | resolved "https://registry.yarnpkg.com/kareem/-/kareem-2.3.1.tgz#def12d9c941017fabfb00f873af95e9c99e1be87"
249 | integrity sha512-l3hLhffs9zqoDe8zjmb/mAN4B8VT3L56EUvKNqLFVs9YlFA+zx7ke1DO8STAdDyYNkeSo1nKmjuvQeI12So8Xw==
250 |
251 | media-typer@0.3.0:
252 | version "0.3.0"
253 | resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748"
254 | integrity sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=
255 |
256 | merge-descriptors@1.0.1:
257 | version "1.0.1"
258 | resolved "https://registry.yarnpkg.com/merge-descriptors/-/merge-descriptors-1.0.1.tgz#b00aaa556dd8b44568150ec9d1b953f3f90cbb61"
259 | integrity sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=
260 |
261 | methods@~1.1.2:
262 | version "1.1.2"
263 | resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee"
264 | integrity sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=
265 |
266 | mime-db@1.40.0:
267 | version "1.40.0"
268 | resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.40.0.tgz#a65057e998db090f732a68f6c276d387d4126c32"
269 | integrity sha512-jYdeOMPy9vnxEqFRRo6ZvTZ8d9oPb+k18PKoYNYUe2stVEBPPwsln/qWzdbmaIvnhZ9v2P+CuecK+fpUfsV2mA==
270 |
271 | mime-types@~2.1.24:
272 | version "2.1.24"
273 | resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.24.tgz#b6f8d0b3e951efb77dedeca194cff6d16f676f81"
274 | integrity sha512-WaFHS3MCl5fapm3oLxU4eYDw77IQM2ACcxQ9RIxfaC3ooc6PFuBMGZZsYpvoXS5D5QTWPieo1jjLdAm3TBP3cQ==
275 | dependencies:
276 | mime-db "1.40.0"
277 |
278 | mime@1.4.1:
279 | version "1.4.1"
280 | resolved "https://registry.yarnpkg.com/mime/-/mime-1.4.1.tgz#121f9ebc49e3766f311a76e1fa1c8003c4b03aa6"
281 | integrity sha512-KI1+qOZu5DcW6wayYHSzR/tXKCDC5Om4s1z2QJjDULzLcmf3DvzS7oluY4HCTrc+9FiKmWUgeNLg7W3uIQvxtQ==
282 |
283 | mongodb@3.3.2:
284 | version "3.3.2"
285 | resolved "https://registry.yarnpkg.com/mongodb/-/mongodb-3.3.2.tgz#ff086b5f552cf07e24ce098694210f3d42d668b2"
286 | integrity sha512-fqJt3iywelk4yKu/lfwQg163Bjpo5zDKhXiohycvon4iQHbrfflSAz9AIlRE6496Pm/dQKQK5bMigdVo2s6gBg==
287 | dependencies:
288 | bson "^1.1.1"
289 | require_optional "^1.0.1"
290 | safe-buffer "^5.1.2"
291 |
292 | mongoose-legacy-pluralize@1.0.2:
293 | version "1.0.2"
294 | resolved "https://registry.yarnpkg.com/mongoose-legacy-pluralize/-/mongoose-legacy-pluralize-1.0.2.tgz#3ba9f91fa507b5186d399fb40854bff18fb563e4"
295 | integrity sha512-Yo/7qQU4/EyIS8YDFSeenIvXxZN+ld7YdV9LqFVQJzTLye8unujAWPZ4NWKfFA+RNjh+wvTWKY9Z3E5XM6ZZiQ==
296 |
297 | mongoose@^5.7.5:
298 | version "5.7.5"
299 | resolved "https://registry.yarnpkg.com/mongoose/-/mongoose-5.7.5.tgz#b787b47216edf62036aa358c3ef0f1869c46cdc2"
300 | integrity sha512-BZ4FxtnbTurc/wcm/hLltLdI4IDxo4nsE0D9q58YymTdZwreNzwO62CcjVtaHhmr8HmJtOInp2W/T12FZaMf8g==
301 | dependencies:
302 | bson "~1.1.1"
303 | kareem "2.3.1"
304 | mongodb "3.3.2"
305 | mongoose-legacy-pluralize "1.0.2"
306 | mpath "0.6.0"
307 | mquery "3.2.2"
308 | ms "2.1.2"
309 | regexp-clone "1.0.0"
310 | safe-buffer "5.1.2"
311 | sift "7.0.1"
312 | sliced "1.0.1"
313 |
314 | mpath@0.6.0:
315 | version "0.6.0"
316 | resolved "https://registry.yarnpkg.com/mpath/-/mpath-0.6.0.tgz#aa922029fca4f0f641f360e74c5c1b6a4c47078e"
317 | integrity sha512-i75qh79MJ5Xo/sbhxrDrPSEG0H/mr1kcZXJ8dH6URU5jD/knFxCVqVC/gVSW7GIXL/9hHWlT9haLbCXWOll3qw==
318 |
319 | mquery@3.2.2:
320 | version "3.2.2"
321 | resolved "https://registry.yarnpkg.com/mquery/-/mquery-3.2.2.tgz#e1383a3951852ce23e37f619a9b350f1fb3664e7"
322 | integrity sha512-XB52992COp0KP230I3qloVUbkLUxJIu328HBP2t2EsxSFtf4W1HPSOBWOXf1bqxK4Xbb66lfMJ+Bpfd9/yZE1Q==
323 | dependencies:
324 | bluebird "3.5.1"
325 | debug "3.1.0"
326 | regexp-clone "^1.0.0"
327 | safe-buffer "5.1.2"
328 | sliced "1.0.1"
329 |
330 | ms@2.0.0:
331 | version "2.0.0"
332 | resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8"
333 | integrity sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=
334 |
335 | ms@2.1.2:
336 | version "2.1.2"
337 | resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009"
338 | integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==
339 |
340 | negotiator@0.6.2:
341 | version "0.6.2"
342 | resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.2.tgz#feacf7ccf525a77ae9634436a64883ffeca346fb"
343 | integrity sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw==
344 |
345 | object-assign@^4:
346 | version "4.1.1"
347 | resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863"
348 | integrity sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=
349 |
350 | on-finished@~2.3.0:
351 | version "2.3.0"
352 | resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.3.0.tgz#20f1336481b083cd75337992a16971aa2d906947"
353 | integrity sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=
354 | dependencies:
355 | ee-first "1.1.1"
356 |
357 | parseurl@~1.3.2:
358 | version "1.3.3"
359 | resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.3.tgz#9da19e7bee8d12dff0513ed5b76957793bc2e8d4"
360 | integrity sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==
361 |
362 | path-to-regexp@0.1.7:
363 | version "0.1.7"
364 | resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c"
365 | integrity sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=
366 |
367 | proxy-addr@~2.0.4:
368 | version "2.0.5"
369 | resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-2.0.5.tgz#34cbd64a2d81f4b1fd21e76f9f06c8a45299ee34"
370 | integrity sha512-t/7RxHXPH6cJtP0pRG6smSr9QJidhB+3kXu0KgXnbGYMgzEnUxRQ4/LDdfOwZEMyIh3/xHb8PX3t+lfL9z+YVQ==
371 | dependencies:
372 | forwarded "~0.1.2"
373 | ipaddr.js "1.9.0"
374 |
375 | qs@6.5.2:
376 | version "6.5.2"
377 | resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36"
378 | integrity sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==
379 |
380 | qs@6.7.0:
381 | version "6.7.0"
382 | resolved "https://registry.yarnpkg.com/qs/-/qs-6.7.0.tgz#41dc1a015e3d581f1621776be31afb2876a9b1bc"
383 | integrity sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ==
384 |
385 | range-parser@~1.2.0:
386 | version "1.2.1"
387 | resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.1.tgz#3cf37023d199e1c24d1a55b84800c2f3e6468031"
388 | integrity sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==
389 |
390 | raw-body@2.3.3:
391 | version "2.3.3"
392 | resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.3.3.tgz#1b324ece6b5706e153855bc1148c65bb7f6ea0c3"
393 | integrity sha512-9esiElv1BrZoI3rCDuOuKCBRbuApGGaDPQfjSflGxdy4oyzqghxu6klEkkVIvBje+FF0BX9coEv8KqW6X/7njw==
394 | dependencies:
395 | bytes "3.0.0"
396 | http-errors "1.6.3"
397 | iconv-lite "0.4.23"
398 | unpipe "1.0.0"
399 |
400 | raw-body@2.4.0:
401 | version "2.4.0"
402 | resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.4.0.tgz#a1ce6fb9c9bc356ca52e89256ab59059e13d0332"
403 | integrity sha512-4Oz8DUIwdvoa5qMJelxipzi/iJIi40O5cGV1wNYp5hvZP8ZN0T+jiNkL0QepXs+EsQ9XJ8ipEDoiH70ySUJP3Q==
404 | dependencies:
405 | bytes "3.1.0"
406 | http-errors "1.7.2"
407 | iconv-lite "0.4.24"
408 | unpipe "1.0.0"
409 |
410 | regexp-clone@1.0.0, regexp-clone@^1.0.0:
411 | version "1.0.0"
412 | resolved "https://registry.yarnpkg.com/regexp-clone/-/regexp-clone-1.0.0.tgz#222db967623277056260b992626354a04ce9bf63"
413 | integrity sha512-TuAasHQNamyyJ2hb97IuBEif4qBHGjPHBS64sZwytpLEqtBQ1gPJTnOaQ6qmpET16cK14kkjbazl6+p0RRv0yw==
414 |
415 | require_optional@^1.0.1:
416 | version "1.0.1"
417 | resolved "https://registry.yarnpkg.com/require_optional/-/require_optional-1.0.1.tgz#4cf35a4247f64ca3df8c2ef208cc494b1ca8fc2e"
418 | integrity sha512-qhM/y57enGWHAe3v/NcwML6a3/vfESLe/sGM2dII+gEO0BpKRUkWZow/tyloNqJyN6kXSl3RyyM8Ll5D/sJP8g==
419 | dependencies:
420 | resolve-from "^2.0.0"
421 | semver "^5.1.0"
422 |
423 | resolve-from@^2.0.0:
424 | version "2.0.0"
425 | resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-2.0.0.tgz#9480ab20e94ffa1d9e80a804c7ea147611966b57"
426 | integrity sha1-lICrIOlP+h2egKgEx+oUdhGWa1c=
427 |
428 | safe-buffer@5.1.2, safe-buffer@^5.1.2:
429 | version "5.1.2"
430 | resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d"
431 | integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==
432 |
433 | "safer-buffer@>= 2.1.2 < 3":
434 | version "2.1.2"
435 | resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a"
436 | integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==
437 |
438 | semver@^5.1.0:
439 | version "5.7.0"
440 | resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.0.tgz#790a7cf6fea5459bac96110b29b60412dc8ff96b"
441 | integrity sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==
442 |
443 | send@0.16.2:
444 | version "0.16.2"
445 | resolved "https://registry.yarnpkg.com/send/-/send-0.16.2.tgz#6ecca1e0f8c156d141597559848df64730a6bbc1"
446 | integrity sha512-E64YFPUssFHEFBvpbbjr44NCLtI1AohxQ8ZSiJjQLskAdKuriYEP6VyGEsRDH8ScozGpkaX1BGvhanqCwkcEZw==
447 | dependencies:
448 | debug "2.6.9"
449 | depd "~1.1.2"
450 | destroy "~1.0.4"
451 | encodeurl "~1.0.2"
452 | escape-html "~1.0.3"
453 | etag "~1.8.1"
454 | fresh "0.5.2"
455 | http-errors "~1.6.2"
456 | mime "1.4.1"
457 | ms "2.0.0"
458 | on-finished "~2.3.0"
459 | range-parser "~1.2.0"
460 | statuses "~1.4.0"
461 |
462 | serve-static@1.13.2:
463 | version "1.13.2"
464 | resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.13.2.tgz#095e8472fd5b46237db50ce486a43f4b86c6cec1"
465 | integrity sha512-p/tdJrO4U387R9oMjb1oj7qSMaMfmOyd4j9hOFoxZe2baQszgHcSWjuya/CiT5kgZZKRudHNOA0pYXOl8rQ5nw==
466 | dependencies:
467 | encodeurl "~1.0.2"
468 | escape-html "~1.0.3"
469 | parseurl "~1.3.2"
470 | send "0.16.2"
471 |
472 | setprototypeof@1.1.0:
473 | version "1.1.0"
474 | resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.1.0.tgz#d0bd85536887b6fe7c0d818cb962d9d91c54e656"
475 | integrity sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ==
476 |
477 | setprototypeof@1.1.1:
478 | version "1.1.1"
479 | resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.1.1.tgz#7e95acb24aa92f5885e0abef5ba131330d4ae683"
480 | integrity sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw==
481 |
482 | sift@7.0.1:
483 | version "7.0.1"
484 | resolved "https://registry.yarnpkg.com/sift/-/sift-7.0.1.tgz#47d62c50b159d316f1372f8b53f9c10cd21a4b08"
485 | integrity sha512-oqD7PMJ+uO6jV9EQCl0LrRw1OwsiPsiFQR5AR30heR+4Dl7jBBbDLnNvWiak20tzZlSE1H7RB30SX/1j/YYT7g==
486 |
487 | sliced@1.0.1:
488 | version "1.0.1"
489 | resolved "https://registry.yarnpkg.com/sliced/-/sliced-1.0.1.tgz#0b3a662b5d04c3177b1926bea82b03f837a2ef41"
490 | integrity sha1-CzpmK10Ewxd7GSa+qCsD+Dei70E=
491 |
492 | "statuses@>= 1.4.0 < 2", "statuses@>= 1.5.0 < 2":
493 | version "1.5.0"
494 | resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c"
495 | integrity sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=
496 |
497 | statuses@~1.4.0:
498 | version "1.4.0"
499 | resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.4.0.tgz#bb73d446da2796106efcc1b601a253d6c46bd087"
500 | integrity sha512-zhSCtt8v2NDrRlPQpCNtw/heZLtfUDqxBM1udqikb/Hbk52LK4nQSwr10u77iopCW5LsyHpuXS0GnEc48mLeew==
501 |
502 | toidentifier@1.0.0:
503 | version "1.0.0"
504 | resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.0.tgz#7e1be3470f1e77948bc43d94a3c8f4d7752ba553"
505 | integrity sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw==
506 |
507 | type-is@~1.6.16, type-is@~1.6.17:
508 | version "1.6.18"
509 | resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.6.18.tgz#4e552cd05df09467dcbc4ef739de89f2cf37c131"
510 | integrity sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==
511 | dependencies:
512 | media-typer "0.3.0"
513 | mime-types "~2.1.24"
514 |
515 | unpipe@1.0.0, unpipe@~1.0.0:
516 | version "1.0.0"
517 | resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec"
518 | integrity sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=
519 |
520 | utils-merge@1.0.1:
521 | version "1.0.1"
522 | resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713"
523 | integrity sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=
524 |
525 | vary@^1, vary@~1.1.2:
526 | version "1.1.2"
527 | resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc"
528 | integrity sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=
529 |
--------------------------------------------------------------------------------