Giter Site home page Giter Site logo

node-express-json-rpc2's People

Contributors

brianbelhumeur avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

node-express-json-rpc2's Issues

jsonp requests on't support post - only get

so there's no guarantee anything is going to be in req.body

the line rpcList = req.body should be changed to
rpcList = req.body || req.query;
that way it handles posts and gets

Hope all is going well.

.... has no method 'jsonrpc'

Hi there,

I am getting an the following error when starting node -

app.use( express.jsonrpc() );
^
TypeError: Object function createApplication() {
var app = connect();
utils.merge(app, proto);
app.request = { proto: req };
app.response = { proto: res };
app.init();
return app;
} has no method 'jsonrpc'

My setup code is as follows -

var express = require('express')
, routes = require('./routes')
, user = require('./routes/user')
, jobs = require('./routes/jobs')
, http = require('http')
, path = require('path')
, jsonrpc = require('node-express-json-rpc2');

var app = express();

// all environments
app.set('port', process.env.PORT || 3000);
app.set('views', __dirname + '/views');
app.set('view engine', 'jade');
app.use( express.jsonrpc() );
app.use(express.favicon());
app.use(express.logger('dev'));
app.use(express.bodyParser());
app.use(express.methodOverride());
app.use(app.router);
app.use(express.static(path.join(__dirname, 'public')));

Is this a bug or have I messed up?!

Thanks,
Sean

edit:

I added express.jsonrpc = jsonrpc and the error is no more however all rpc calls come back with method not found errors.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.