Browse Source

/ added

pull/1/head
Senta Mandutz 5 years ago
parent
commit
7dea38049b
1 changed files with 4 additions and 4 deletions
  1. 4
    4
      server.js

+ 4
- 4
server.js View File

@@ -24,7 +24,7 @@ const Message = require('./message.model.js');

var app = express();

var http_port=8888;
var http_port=8013;
https_port=8889;

/*
@@ -103,7 +103,7 @@ mongoose.connect(dbConfig.url)

//require('./app/routes/message.route.js')(app);

app.get ('api/ids', function (req, res) {
app.get ('/api/ids', function (req, res) {
Message.find({},{id: true}) .exec () .then(results => {
//selects id from message:
var parsed = [];
@@ -119,7 +119,7 @@ app.get ('api/ids', function (req, res) {
});
});

app.get ("api/msg/:id", function (req, res) {
app.get ("/api/msg/:id", function (req, res) {
Message.findOne ({_id: req.params.id}) .exec (function (err, results){
if (err) {
console.log (err);
@@ -141,7 +141,7 @@ app.get ("api/msg/:id", function (req, res) {
return text;
}*/

app.post("api/createMsg", function(req, res){
app.post("/api/createMsg", function(req, res){
//x = mongoose.Types.ObjectId();
//y = x.toString();
//var z = makeid();

Loading…
Cancel
Save