I found in GitHub twit NPM and create app with the code:
-> express twitter
-> in the app.js:
var T = new Twit({
consumer_key: 'AAA',
consumer_secret: 'BBB',
access_token: 'CCC',
access_token_secret: 'DDD'
})
T.post('/update', { status: 'hello world!' }, function(err, data, response) {
console.log(data)
})
// I write it in the end of whole code that generated by express. But when I start
it with the comand node app.js it prints "undefined" and 404 Not Found when
I run it from browser.
Who knows, how can I solve this problem? I also have routes folder too. But anything else in addition of express generated code I do not have.
Screenshot: https://i.stack.imgur.com/JQZbP.png