A simple example to create a websocket server and stream tweets about a pre-defined subject to the page.
$ npm install socket.io, twitter
$ node ./app.js
const dateParseHelper = sessions => { | |
let options = { | |
day: "numeric", | |
month: "short", | |
year: "numeric", | |
hour: "2-digit", | |
minute: "2-digit", | |
hourCycle: "h24" | |
}; | |
const convertedSessions = sessions.map(session => { |
var Aws = require('aws-sdk'); | |
var sinon = require('sinon'); | |
// Only works for 'createBucket', 'update' and a few others since most API methods are generated dynamically | |
// upon instantiation. Very counterintuitive, thanks Amazon! | |
var createBucket = sinon.stub(Aws.S3.prototype, 'createBucket'); | |
createBucket.yields(null, 'Me create bucket'); | |
// For other methods, we can 'assign' the stubs to the proto, already defined function won't be overridden | |
var listBuckets = Aws.S3.prototype.listBuckets = sinon.stub(); |
=Navigating= | |
visit('/projects') | |
visit(post_comments_path(post)) | |
=Clicking links and buttons= | |
click_link('id-of-link') | |
click_link('Link Text') | |
click_button('Save') | |
click('Link Text') # Click either a link or a button | |
click('Button Value') |
People
:bowtie: |
😄 :smile: |
😆 :laughing: |
---|---|---|
😊 :blush: |
😃 :smiley: |
:relaxed: |
😏 :smirk: |
😍 :heart_eyes: |
😘 :kissing_heart: |
😚 :kissing_closed_eyes: |
😳 :flushed: |
😌 :relieved: |
😆 :satisfied: |
😁 :grin: |
😉 :wink: |
😜 :stuck_out_tongue_winking_eye: |
😝 :stuck_out_tongue_closed_eyes: |
😀 :grinning: |
😗 :kissing: |
😙 :kissing_smiling_eyes: |
😛 :stuck_out_tongue: |