#Tweetmap
Show on a map where the latest tweet of a specified word was published. Using Twitter API and Google maps API.
npm install
Create a mysql database with this table (db.sql):
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
CREATE TABLE IF NOT EXISTS `search_history` (
`search_id` int(11) NOT NULL AUTO_INCREMENT,
`search_string` varchar(100) NOT NULL,
`location` varchar(100) NOT NULL,
PRIMARY KEY (`search_id`)
);
configure your db specs in server.js:
host: 'localhost',
user: 'root',
password : 'root',
port : 3306, //port mysql
database:'tweetmap'
Register your application and create a config.js:
{
mapsApiKey: '...',
twitterApi: {
consumerKey: "...",
consumerSecret: "...",
accessToken: "...",
accessTokenSecret: "..."
}
}
node server.js
http://localhost:8000/api/search/