Skip to content

Commit

Permalink
Fix cors problem with heroku deployment and correct procfile config (#28
Browse files Browse the repository at this point in the history
)

* Added proxy module

* Added dotenv context to nuxt config

* Remove seperate proxy config

* Update procfile
  • Loading branch information
danielv14 authored Jul 2, 2019
1 parent 582194b commit 0c140f2
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 13 deletions.
2 changes: 1 addition & 1 deletion Procfile
Original file line number Diff line number Diff line change
@@ -1 +1 @@
web: nuxt start
web: node server/index.js
5 changes: 4 additions & 1 deletion nuxt.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
const VuetifyLoaderPlugin = require('vuetify-loader/lib/plugin')
const pkg = require('./package')
require('dotenv').config()

module.exports = {
mode: 'universal',
Expand Down Expand Up @@ -52,13 +53,15 @@ module.exports = {
modules: [
// Doc: https://axios.nuxtjs.org/usage
'@nuxtjs/axios',
'@nuxtjs/pwa'
'@nuxtjs/pwa',
'@nuxtjs/proxy'
],
/*
** Axios module configuration
*/
axios: {
// See https://github.com/nuxt-community/axios-module#options
proxy: process.env.NODE_ENV === 'production'
},

/*
Expand Down
22 changes: 11 additions & 11 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
},
"dependencies": {
"@nuxtjs/axios": "^5.3.6",
"@nuxtjs/proxy": "^1.3.3",
"@nuxtjs/pwa": "^2.6.0",
"chroma-js": "^2.0.3",
"copy-to-clipboard": "^3.2.0",
Expand Down

0 comments on commit 0c140f2

Please sign in to comment.