https://github.com/lee182/twnight
twiter nightlife, rsvp to the world with your twitter username
https://github.com/lee182/twnight
long-polling mongodb twitter-login vuejs
Last synced: about 2 months ago
JSON representation
twiter nightlife, rsvp to the world with your twitter username
- Host: GitHub
- URL: https://github.com/lee182/twnight
- Owner: Lee182
- Created: 2017-02-03T17:36:51.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-02-04T17:50:02.000Z (over 8 years ago)
- Last Synced: 2025-03-29T06:33:08.455Z (7 months ago)
- Topics: long-polling, mongodb, twitter-login, vuejs
- Language: JavaScript
- Homepage: https://twnight.herokuapp.com/
- Size: 249 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# twitter nightlife
## description
a freecodecamp challenge to build 'going out tonight' tracker with twitter usernames. project uses long-polling to fetch data, and monogodb expiresAt to remove rsvp objects at a given time.
## setup
### install
```shell
# if NODE_ENV isn't set to 'PRODUCTION' devDependencies will be installed
$ npm install
```
### server/keys.js file
it is import to create a file called keys which resembles this format.
```
module.exports = {
mongourl: 'mongodb://[user]:[pwd]@yourdomain.com:[port]/[db_name]',
twitter: {
consumerKey: 'xxxxxxxxxxxxxxxxxxxxxxxxx',
consumerSecret:'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
},
yelp: {
consumer_key: "xxxxxxxxxxxxxxxxxxxxxx",
consumer_secret: "xxxxxxxxxxxxxxxxxxxxxxxxxxx",
token: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
token_secret: "xxxxxxxxxxxxxxxxxxxxxxxxxxx"
}
}
```
twitter oauth keys can be obtainend from https://apps.twitter.com/app/new
### running dev mode,
app/** file changes are watched then compiled to dist
```
$ npm run start-dev
```
### running normally
$ npm run start
## mongodb expire at specific time
```
db.mycollection.createIndex({ "expireAt": 1 }, { expireAfterSeconds: 0 })
```
"expireAt" is the field which is checked per document.
given that 'tonight' will change per day, and also different timezones, the hours until 5am localtime is calculated clientside.
this data is sent server side. along with the bar_id to record.
## Licence & Author
Author: Jonathan T L Lee,
Licence: MIT