Browse Source

Chat Room

master
z3r0Luck 4 years ago
parent
commit
4ee664c74d
  1. 13
      index.html
  2. 47
      server.js.save
  3. 0
      web_app/Dockerfile
  4. 0
      web_app/node_modules/.bin/ejs
  5. 0
      web_app/node_modules/.bin/jake
  6. 0
      web_app/node_modules/.bin/mime
  7. 0
      web_app/node_modules/.bin/semver
  8. 0
      web_app/node_modules/accepts/HISTORY.md
  9. 0
      web_app/node_modules/accepts/LICENSE
  10. 0
      web_app/node_modules/accepts/README.md
  11. 0
      web_app/node_modules/accepts/index.js
  12. 0
      web_app/node_modules/accepts/package.json
  13. 0
      web_app/node_modules/ansi-styles/index.js
  14. 0
      web_app/node_modules/ansi-styles/license
  15. 0
      web_app/node_modules/ansi-styles/package.json
  16. 0
      web_app/node_modules/ansi-styles/readme.md
  17. 0
      web_app/node_modules/array-flatten/LICENSE
  18. 0
      web_app/node_modules/array-flatten/README.md
  19. 0
      web_app/node_modules/array-flatten/array-flatten.js
  20. 0
      web_app/node_modules/array-flatten/package.json
  21. 0
      web_app/node_modules/async/.travis.yml
  22. 0
      web_app/node_modules/async/LICENSE
  23. 0
      web_app/node_modules/async/README.md
  24. 0
      web_app/node_modules/async/bower.json
  25. 0
      web_app/node_modules/async/component.json
  26. 0
      web_app/node_modules/async/lib/async.js
  27. 0
      web_app/node_modules/async/package.json
  28. 0
      web_app/node_modules/async/support/sync-package-managers.js
  29. 0
      web_app/node_modules/balanced-match/.npmignore
  30. 0
      web_app/node_modules/balanced-match/LICENSE.md
  31. 0
      web_app/node_modules/balanced-match/README.md
  32. 0
      web_app/node_modules/balanced-match/index.js
  33. 0
      web_app/node_modules/balanced-match/package.json
  34. 0
      web_app/node_modules/bl/.jshintrc
  35. 0
      web_app/node_modules/bl/.travis.yml
  36. 0
      web_app/node_modules/bl/LICENSE.md
  37. 0
      web_app/node_modules/bl/README.md
  38. 0
      web_app/node_modules/bl/bl.js
  39. 0
      web_app/node_modules/bl/package.json
  40. 0
      web_app/node_modules/bl/test/indexOf.js
  41. 0
      web_app/node_modules/bl/test/test.js
  42. 0
      web_app/node_modules/bluebird/LICENSE
  43. 0
      web_app/node_modules/bluebird/README.md
  44. 0
      web_app/node_modules/bluebird/changelog.md
  45. 0
      web_app/node_modules/bluebird/js/browser/bluebird.core.js
  46. 0
      web_app/node_modules/bluebird/js/browser/bluebird.core.min.js
  47. 0
      web_app/node_modules/bluebird/js/browser/bluebird.js
  48. 0
      web_app/node_modules/bluebird/js/browser/bluebird.min.js
  49. 0
      web_app/node_modules/bluebird/js/release/any.js
  50. 0
      web_app/node_modules/bluebird/js/release/assert.js
  51. 0
      web_app/node_modules/bluebird/js/release/async.js
  52. 0
      web_app/node_modules/bluebird/js/release/bind.js
  53. 0
      web_app/node_modules/bluebird/js/release/bluebird.js
  54. 0
      web_app/node_modules/bluebird/js/release/call_get.js
  55. 0
      web_app/node_modules/bluebird/js/release/cancel.js
  56. 0
      web_app/node_modules/bluebird/js/release/catch_filter.js
  57. 0
      web_app/node_modules/bluebird/js/release/context.js
  58. 0
      web_app/node_modules/bluebird/js/release/debuggability.js
  59. 0
      web_app/node_modules/bluebird/js/release/direct_resolve.js
  60. 0
      web_app/node_modules/bluebird/js/release/each.js
  61. 0
      web_app/node_modules/bluebird/js/release/errors.js
  62. 0
      web_app/node_modules/bluebird/js/release/es5.js
  63. 0
      web_app/node_modules/bluebird/js/release/filter.js
  64. 0
      web_app/node_modules/bluebird/js/release/finally.js
  65. 0
      web_app/node_modules/bluebird/js/release/generators.js
  66. 0
      web_app/node_modules/bluebird/js/release/join.js
  67. 0
      web_app/node_modules/bluebird/js/release/map.js
  68. 0
      web_app/node_modules/bluebird/js/release/method.js
  69. 0
      web_app/node_modules/bluebird/js/release/nodeback.js
  70. 0
      web_app/node_modules/bluebird/js/release/nodeify.js
  71. 0
      web_app/node_modules/bluebird/js/release/promise.js
  72. 0
      web_app/node_modules/bluebird/js/release/promise_array.js
  73. 0
      web_app/node_modules/bluebird/js/release/promisify.js
  74. 0
      web_app/node_modules/bluebird/js/release/props.js
  75. 0
      web_app/node_modules/bluebird/js/release/queue.js
  76. 0
      web_app/node_modules/bluebird/js/release/race.js
  77. 0
      web_app/node_modules/bluebird/js/release/reduce.js
  78. 0
      web_app/node_modules/bluebird/js/release/schedule.js
  79. 0
      web_app/node_modules/bluebird/js/release/settle.js
  80. 0
      web_app/node_modules/bluebird/js/release/some.js
  81. 0
      web_app/node_modules/bluebird/js/release/synchronous_inspection.js
  82. 0
      web_app/node_modules/bluebird/js/release/thenables.js
  83. 0
      web_app/node_modules/bluebird/js/release/timers.js
  84. 0
      web_app/node_modules/bluebird/js/release/using.js
  85. 0
      web_app/node_modules/bluebird/js/release/util.js
  86. 0
      web_app/node_modules/bluebird/package.json
  87. 0
      web_app/node_modules/body-parser/HISTORY.md
  88. 0
      web_app/node_modules/body-parser/LICENSE
  89. 0
      web_app/node_modules/body-parser/README.md
  90. 0
      web_app/node_modules/body-parser/index.js
  91. 0
      web_app/node_modules/body-parser/lib/read.js
  92. 0
      web_app/node_modules/body-parser/lib/types/json.js
  93. 0
      web_app/node_modules/body-parser/lib/types/raw.js
  94. 0
      web_app/node_modules/body-parser/lib/types/text.js
  95. 0
      web_app/node_modules/body-parser/lib/types/urlencoded.js
  96. 0
      web_app/node_modules/body-parser/package.json
  97. 0
      web_app/node_modules/brace-expansion/LICENSE
  98. 0
      web_app/node_modules/brace-expansion/README.md
  99. 0
      web_app/node_modules/brace-expansion/index.js
  100. 0
      web_app/node_modules/brace-expansion/package.json

13
index.html

@ -1,13 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Cloud Web App</title>
</head>
<body>
<form action="/quotes" method="POST">
<input type="text" placeholder="name" name="name">
<input type="text" placeholder="post" name="post">
<button type="submit">Submit</button>
</form>
</body>

47
server.js.save

@ -1,47 +0,0 @@
// declaring dependencies
const express = require('express');
const bodyParser= require('body-parser')
const app = express();
// Make sure you place body-parser before your CRUD handlers!
app.use(bodyParser.urlencoded({ extended: true }))
// Constants
const PORT = 8080;
const HOST = '0.0.0.0';
var MongoClient = require('mongodb').MongoClient;
var connectionString = "mongodb://10.0.5.3:27017/";
MongoClient.connect(connectionString, { useUnifiedTopology: true })
.then(client => {
console.log('Connected to Database')
const db = client.db('cloudDB')
const quotesCollection = db.collection('mycollection')
app.post('/quotes', (req, res) => {
quotesCollection.insertOne(req.body)
.then(result => {
res.redirect('/')
})
.catch(error => console.error(error))
})
app.get('/', (req, res) => {
const cursor = db.collection('quotes').find().toArray()
.then(results => {
console.log(results)
})
res.sendFile(__dirname + '/index.html')
})
app.listen(PORT, HOST);
})
console.log(`Running on http://${HOST}:${PORT}`);

0
Dockerfile → web_app/Dockerfile

0
node_modules/.bin/ejs → web_app/node_modules/.bin/ejs

0
node_modules/.bin/jake → web_app/node_modules/.bin/jake

0
node_modules/.bin/mime → web_app/node_modules/.bin/mime

0
node_modules/.bin/semver → web_app/node_modules/.bin/semver

0
node_modules/accepts/HISTORY.md → web_app/node_modules/accepts/HISTORY.md

0
node_modules/accepts/LICENSE → web_app/node_modules/accepts/LICENSE

0
node_modules/accepts/README.md → web_app/node_modules/accepts/README.md

0
node_modules/accepts/index.js → web_app/node_modules/accepts/index.js

0
node_modules/accepts/package.json → web_app/node_modules/accepts/package.json

0
node_modules/ansi-styles/index.js → web_app/node_modules/ansi-styles/index.js

0
node_modules/ansi-styles/license → web_app/node_modules/ansi-styles/license

0
node_modules/ansi-styles/package.json → web_app/node_modules/ansi-styles/package.json

0
node_modules/ansi-styles/readme.md → web_app/node_modules/ansi-styles/readme.md

0
node_modules/array-flatten/LICENSE → web_app/node_modules/array-flatten/LICENSE

0
node_modules/array-flatten/README.md → web_app/node_modules/array-flatten/README.md

0
node_modules/array-flatten/array-flatten.js → web_app/node_modules/array-flatten/array-flatten.js

0
node_modules/array-flatten/package.json → web_app/node_modules/array-flatten/package.json

0
node_modules/async/.travis.yml → web_app/node_modules/async/.travis.yml

0
node_modules/async/LICENSE → web_app/node_modules/async/LICENSE

0
node_modules/async/README.md → web_app/node_modules/async/README.md

0
node_modules/async/bower.json → web_app/node_modules/async/bower.json

0
node_modules/async/component.json → web_app/node_modules/async/component.json

0
node_modules/async/lib/async.js → web_app/node_modules/async/lib/async.js

0
node_modules/async/package.json → web_app/node_modules/async/package.json

0
node_modules/async/support/sync-package-managers.js → web_app/node_modules/async/support/sync-package-managers.js

0
node_modules/balanced-match/.npmignore → web_app/node_modules/balanced-match/.npmignore

0
node_modules/balanced-match/LICENSE.md → web_app/node_modules/balanced-match/LICENSE.md

0
node_modules/balanced-match/README.md → web_app/node_modules/balanced-match/README.md

0
node_modules/balanced-match/index.js → web_app/node_modules/balanced-match/index.js

0
node_modules/balanced-match/package.json → web_app/node_modules/balanced-match/package.json

0
node_modules/bl/.jshintrc → web_app/node_modules/bl/.jshintrc

0
node_modules/bl/.travis.yml → web_app/node_modules/bl/.travis.yml

0
node_modules/bl/LICENSE.md → web_app/node_modules/bl/LICENSE.md

0
node_modules/bl/README.md → web_app/node_modules/bl/README.md

0
node_modules/bl/bl.js → web_app/node_modules/bl/bl.js

0
node_modules/bl/package.json → web_app/node_modules/bl/package.json

0
node_modules/bl/test/indexOf.js → web_app/node_modules/bl/test/indexOf.js

0
node_modules/bl/test/test.js → web_app/node_modules/bl/test/test.js

0
node_modules/bluebird/LICENSE → web_app/node_modules/bluebird/LICENSE

0
node_modules/bluebird/README.md → web_app/node_modules/bluebird/README.md

0
node_modules/bluebird/changelog.md → web_app/node_modules/bluebird/changelog.md

0
node_modules/bluebird/js/browser/bluebird.core.js → web_app/node_modules/bluebird/js/browser/bluebird.core.js

0
node_modules/bluebird/js/browser/bluebird.core.min.js → web_app/node_modules/bluebird/js/browser/bluebird.core.min.js

0
node_modules/bluebird/js/browser/bluebird.js → web_app/node_modules/bluebird/js/browser/bluebird.js

0
node_modules/bluebird/js/browser/bluebird.min.js → web_app/node_modules/bluebird/js/browser/bluebird.min.js

0
node_modules/bluebird/js/release/any.js → web_app/node_modules/bluebird/js/release/any.js

0
node_modules/bluebird/js/release/assert.js → web_app/node_modules/bluebird/js/release/assert.js

0
node_modules/bluebird/js/release/async.js → web_app/node_modules/bluebird/js/release/async.js

0
node_modules/bluebird/js/release/bind.js → web_app/node_modules/bluebird/js/release/bind.js

0
node_modules/bluebird/js/release/bluebird.js → web_app/node_modules/bluebird/js/release/bluebird.js

0
node_modules/bluebird/js/release/call_get.js → web_app/node_modules/bluebird/js/release/call_get.js

0
node_modules/bluebird/js/release/cancel.js → web_app/node_modules/bluebird/js/release/cancel.js

0
node_modules/bluebird/js/release/catch_filter.js → web_app/node_modules/bluebird/js/release/catch_filter.js

0
node_modules/bluebird/js/release/context.js → web_app/node_modules/bluebird/js/release/context.js

0
node_modules/bluebird/js/release/debuggability.js → web_app/node_modules/bluebird/js/release/debuggability.js

0
node_modules/bluebird/js/release/direct_resolve.js → web_app/node_modules/bluebird/js/release/direct_resolve.js

0
node_modules/bluebird/js/release/each.js → web_app/node_modules/bluebird/js/release/each.js

0
node_modules/bluebird/js/release/errors.js → web_app/node_modules/bluebird/js/release/errors.js

0
node_modules/bluebird/js/release/es5.js → web_app/node_modules/bluebird/js/release/es5.js

0
node_modules/bluebird/js/release/filter.js → web_app/node_modules/bluebird/js/release/filter.js

0
node_modules/bluebird/js/release/finally.js → web_app/node_modules/bluebird/js/release/finally.js

0
node_modules/bluebird/js/release/generators.js → web_app/node_modules/bluebird/js/release/generators.js

0
node_modules/bluebird/js/release/join.js → web_app/node_modules/bluebird/js/release/join.js

0
node_modules/bluebird/js/release/map.js → web_app/node_modules/bluebird/js/release/map.js

0
node_modules/bluebird/js/release/method.js → web_app/node_modules/bluebird/js/release/method.js

0
node_modules/bluebird/js/release/nodeback.js → web_app/node_modules/bluebird/js/release/nodeback.js

0
node_modules/bluebird/js/release/nodeify.js → web_app/node_modules/bluebird/js/release/nodeify.js

0
node_modules/bluebird/js/release/promise.js → web_app/node_modules/bluebird/js/release/promise.js

0
node_modules/bluebird/js/release/promise_array.js → web_app/node_modules/bluebird/js/release/promise_array.js

0
node_modules/bluebird/js/release/promisify.js → web_app/node_modules/bluebird/js/release/promisify.js

0
node_modules/bluebird/js/release/props.js → web_app/node_modules/bluebird/js/release/props.js

0
node_modules/bluebird/js/release/queue.js → web_app/node_modules/bluebird/js/release/queue.js

0
node_modules/bluebird/js/release/race.js → web_app/node_modules/bluebird/js/release/race.js

0
node_modules/bluebird/js/release/reduce.js → web_app/node_modules/bluebird/js/release/reduce.js

0
node_modules/bluebird/js/release/schedule.js → web_app/node_modules/bluebird/js/release/schedule.js

0
node_modules/bluebird/js/release/settle.js → web_app/node_modules/bluebird/js/release/settle.js

0
node_modules/bluebird/js/release/some.js → web_app/node_modules/bluebird/js/release/some.js

0
node_modules/bluebird/js/release/synchronous_inspection.js → web_app/node_modules/bluebird/js/release/synchronous_inspection.js

0
node_modules/bluebird/js/release/thenables.js → web_app/node_modules/bluebird/js/release/thenables.js

0
node_modules/bluebird/js/release/timers.js → web_app/node_modules/bluebird/js/release/timers.js

0
node_modules/bluebird/js/release/using.js → web_app/node_modules/bluebird/js/release/using.js

0
node_modules/bluebird/js/release/util.js → web_app/node_modules/bluebird/js/release/util.js

0
node_modules/bluebird/package.json → web_app/node_modules/bluebird/package.json

0
node_modules/body-parser/HISTORY.md → web_app/node_modules/body-parser/HISTORY.md

0
node_modules/body-parser/LICENSE → web_app/node_modules/body-parser/LICENSE

0
node_modules/body-parser/README.md → web_app/node_modules/body-parser/README.md

0
node_modules/body-parser/index.js → web_app/node_modules/body-parser/index.js

0
node_modules/body-parser/lib/read.js → web_app/node_modules/body-parser/lib/read.js

0
node_modules/body-parser/lib/types/json.js → web_app/node_modules/body-parser/lib/types/json.js

0
node_modules/body-parser/lib/types/raw.js → web_app/node_modules/body-parser/lib/types/raw.js

0
node_modules/body-parser/lib/types/text.js → web_app/node_modules/body-parser/lib/types/text.js

0
node_modules/body-parser/lib/types/urlencoded.js → web_app/node_modules/body-parser/lib/types/urlencoded.js

0
node_modules/body-parser/package.json → web_app/node_modules/body-parser/package.json

0
node_modules/brace-expansion/LICENSE → web_app/node_modules/brace-expansion/LICENSE

0
node_modules/brace-expansion/README.md → web_app/node_modules/brace-expansion/README.md

0
node_modules/brace-expansion/index.js → web_app/node_modules/brace-expansion/index.js

0
node_modules/brace-expansion/package.json → web_app/node_modules/brace-expansion/package.json

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save