If you would like to try the server on your VM, you need to the following changes:
- In server.js:
var dbUri = "mongodb://[username]:[pwd]@127.0.0.1:27017/[username]?authSource=[username]&compressors=snappy&gssapiServiceName=mongodb";
&&
app.listen([your port], function(err) {
- In webpack.config.js: change:
entry: [
'webpack-hot-middleware/client',
'./src/index.js',
],
to
entry: [
'webpack-hot-middleware/client?path=http://csci2720.cse.cuhk.edu.hk/[your port]/__webpack_hmr',
'./src/index.js',
],
- every component with ajax:
change:
const post = "/[your port]"
- LoginContainer.js
- LoginPage.js
- TopBar.js
- ResTable.js
- FlushDataCard.js
- CRUDUser.js
- CRUDLocation.js
- MainPage.js