Error Nodejs server and client

0

SERVER.JS

var express = require('express');
var bodyParser = require('body-parser');
var jayson = require('jayson');

var cats = {
    speak: function(callback) {
        callback(null, 'meow');
    }
}
var dogs = {
    speak: function(callback) {
        callback(null, 'woof');
    }
}

var app = express();
app.use(bodyParser.urlencoded({extended: true}));
app.use(bodyParser.json());
app.post('/cats', jayson.server(cats).middleware());
app.post('/dogs', jayson.server(dogs).middleware());
app.listen(5000);

CLIENT link link

Send error when I execute it, I can not get GET / dogs or / cats

Any ideas why ????

    
asked by Steve 27.05.2018 в 22:56
source

0 answers