Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
diasjoaovitor committed Dec 2, 2020
1 parent d7ca304 commit de326e4
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
},
"dependencies": {
"cors": "^2.8.5",
"dotenv": "^8.2.0",
"express": "^4.17.1",
"path": "^0.12.7",
"scrape-it": "^5.2.4"
Expand Down
5 changes: 4 additions & 1 deletion src/server.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
import express from 'express'
import cors from 'cors'
import path from 'path'
import dotenv from 'dotenv'

import routes from './routes.js'

const APP_PORT = process.env.PORT || 3001

const app = express()

dotenv.config()

app.use(cors())
app.use(express.json())
app.use(express.static(path.join(__dirname, '../client/build')))
app.use(express.static(path.join('client/build')))
app.use(routes)
app.listen(APP_PORT, () => console.log('> Server is running...'))
5 changes: 5 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -556,6 +556,11 @@ dot-prop@^5.2.0:
dependencies:
is-obj "^2.0.0"

dotenv@^8.2.0:
version "8.2.0"
resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-8.2.0.tgz#97e619259ada750eea3e4ea3e26bceea5424b16a"
integrity sha512-8sJ78ElpbDJBHNeBzUbUVLsqKdccaa/BXF1uPTw3GrvQTBgrQrtObr2mUrE38vzYd8cEv+m/JBfDLioYcfXoaw==

duplexer3@^0.1.4:
version "0.1.4"
resolved "https://registry.yarnpkg.com/duplexer3/-/duplexer3-0.1.4.tgz#ee01dd1cac0ed3cbc7fdbea37dc0a8f1ce002ce2"
Expand Down

0 comments on commit de326e4

Please sign in to comment.