Updating routes and adding dev webpack to package.json

This commit is contained in:
David Jay
2016-11-07 13:51:40 -05:00
parent 3b75445309
commit e5c04b5fd1
3 changed files with 7 additions and 5 deletions
@@ -9,13 +9,14 @@ module.exports = {
path.join(__dirname, 'src', 'app')
],
output: {
path: path.join(__dirname, 'dist'),
path: path.join(__dirname, '..', '..','dist', 'coral-embed-stream'),
filename: 'bundle.js',
publicPath: '/'
},
resolve: {
root: [
path.resolve(__dirname, 'src')
path.resolve(__dirname, 'src'),
path.resolve(__dirname, '..')
],
extensions: ['', '.js', '.jsx']
},
@@ -180,7 +180,8 @@ export function postItem (item, type, id) {
method: 'POST',
body: JSON.stringify(item)
}
return fetch('api/v1/' + type, options)
console.log('postItem', options);
return fetch('/api/v1/' + type, options)
.then(
response => {
return response.ok ? response.json()
@@ -223,7 +224,7 @@ export function postAction (id, type, user_id) {
}
dispatch(appendItemArray(id, type, user_id))
return fetch('api/v1/comments/' + id + '/actions', options)
return fetch('/api/v1/comments/' + id + '/actions', options)
.then(
response => {
return response.ok ? response.text()
+1 -1
View File
@@ -10,7 +10,7 @@
"pretest": "npm install",
"test": "mocha tests --recursive",
"test-watch": "mocha tests --recursive -w",
"embed-start": "node client/coral-embed-stream/dev-server.js"
"embed-start": "webpack --config ./client/coral-embed-stream/webpack.config.dev.js && ./bin/www"
},
"config": {
"pre-git": {