mirror of
https://github.com/wassname/talk.git
synced 2026-08-09 12:30:42 +08:00
Updating routes and adding dev webpack to package.json
This commit is contained in:
@@ -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
@@ -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": {
|
||||
|
||||
Reference in New Issue
Block a user