Skip to content

Commit

Permalink
adjust server
Browse files Browse the repository at this point in the history
  • Loading branch information
Qusic committed Apr 14, 2017
1 parent d1dc998 commit 10e4ec5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions src/service/api/network.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
import 'whatwg-fetch'

const server = __env.server || 'http://localhost:5000'

export default function Network(hook) {
const network = {}

network.url = (protocol, endpoint) => {
return server.replace(/^http/i, protocol) + endpoint
return __env.server.replace(/^http/i, protocol) + endpoint
}

network.http = async (method, endpoint, data) => {
Expand Down
2 changes: 1 addition & 1 deletion webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const production = process.env.NODE_ENV == 'production'
const devHost = process.env.DEV_HOST || 'localhost'
const devPort = parseInt(process.env.DEV_PORT) || 8080
const devServer = `http://${devHost}:${devPort}`
const apiServer = process.env.WUKONG_SERVER || 'https://api.wukongmusic.us/'
const apiServer = process.env.WUKONG_SERVER || 'https://api.wukongmusic.us'

const config = {
context: sourcePath,
Expand Down

0 comments on commit 10e4ec5

Please sign in to comment.