deployed to vercel successfully

This commit is contained in:
andres alcocer
2022-02-08 21:07:21 -05:00
parent ed0f8a2cf9
commit ad6ade436e
4 changed files with 17373 additions and 3757 deletions

21107
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -25,6 +25,7 @@
"react-player": "^2.9.0",
"react-redux": "^7.2.5",
"react-router-dom": "^5.3.0",
"react-scripts": "^5.0.0",
"redux": "^4.1.1",
"redux-promise": "^0.6.0",
"redux-thunk": "^2.3.0",

View File

@@ -59,7 +59,6 @@ export const fetchSearchMovie = (searchTerm) => {
export const fetchNetflixOriginals = () => {
return async (dispatch) => {
try {
// console.log('PROCESSS', process.env)
const request = await axios.get(
`/discover/tv?api_key=${process.env.API_KEY}&with_networks=213`
)

View File

@@ -7,18 +7,13 @@ const webpack = require('webpack')
var path = require('path')
module.exports = () => {
let envKeys = {}
if (process.env.VERCEL_ENV === 'production') {
envKeys = { API_KEY: process.env.API_KEY }
} else {
// call dotenv and it will return an Object with a parsed key
const env = dotenv.config().parsed
// reduce env variables to an oject
envKeys = Object.keys(env).reduce((prev, next) => {
const envKeys = Object.keys(env).reduce((prev, next) => {
prev[`process.env.${next}`] = JSON.stringify(env[next])
return prev
}, {})
}
return {
entry: './src/index.js',