deployed to vercel successfully
This commit is contained in:
21107
package-lock.json
generated
21107
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -25,6 +25,7 @@
|
|||||||
"react-player": "^2.9.0",
|
"react-player": "^2.9.0",
|
||||||
"react-redux": "^7.2.5",
|
"react-redux": "^7.2.5",
|
||||||
"react-router-dom": "^5.3.0",
|
"react-router-dom": "^5.3.0",
|
||||||
|
"react-scripts": "^5.0.0",
|
||||||
"redux": "^4.1.1",
|
"redux": "^4.1.1",
|
||||||
"redux-promise": "^0.6.0",
|
"redux-promise": "^0.6.0",
|
||||||
"redux-thunk": "^2.3.0",
|
"redux-thunk": "^2.3.0",
|
||||||
|
|||||||
@@ -59,7 +59,6 @@ export const fetchSearchMovie = (searchTerm) => {
|
|||||||
export const fetchNetflixOriginals = () => {
|
export const fetchNetflixOriginals = () => {
|
||||||
return async (dispatch) => {
|
return async (dispatch) => {
|
||||||
try {
|
try {
|
||||||
// console.log('PROCESSS', process.env)
|
|
||||||
const request = await axios.get(
|
const request = await axios.get(
|
||||||
`/discover/tv?api_key=${process.env.API_KEY}&with_networks=213`
|
`/discover/tv?api_key=${process.env.API_KEY}&with_networks=213`
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -7,18 +7,13 @@ const webpack = require('webpack')
|
|||||||
var path = require('path')
|
var path = require('path')
|
||||||
|
|
||||||
module.exports = () => {
|
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
|
// call dotenv and it will return an Object with a parsed key
|
||||||
const env = dotenv.config().parsed
|
const env = dotenv.config().parsed
|
||||||
// reduce env variables to an oject
|
// 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])
|
prev[`process.env.${next}`] = JSON.stringify(env[next])
|
||||||
return prev
|
return prev
|
||||||
}, {})
|
}, {})
|
||||||
}
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
entry: './src/index.js',
|
entry: './src/index.js',
|
||||||
|
|||||||
Reference in New Issue
Block a user