-
Notifications
You must be signed in to change notification settings - Fork 15
Home
First fulfill your platform specific requirements and then do the General Setup.
Summary:
- nodejs 4.x+
- npm 3.x+
- MySQL 5.6.5+ or MariaDB 10.0.1+ (CURRENT_TIMESTAMP on DATETIME) support); MySQL 5.7, MariaDB 10.1 preferred
- redis 3.x+
sudo apt-get update && apt-get upgrade
sudo apt-get dist-upgrade
sudo apt-get autoremove
sudo apt-get install git mysql-server nodejs npm redis-server unicode
# make sure you setup a MySQL root password, empty passwords won't allow access anymore
sudo ln -s /usr/bin/nodejs /usr/bin/node
pacaur -S git mariadb nodejs npm redis
sudo mysql_install_db --user=mysql --basedir=/usr --datadir=/var/lib/mysql
sudo systemctl enable mysqld.service
sudo systemctl start mysqld.service
sudo systemctl enable redis.service
sudo systemctl start redis.service
sudo port install git npm nodejs
sudo port install redis
sudo port load redis
# ref: https://trac.macports.org/wiki/howto/MySQL
sudo port install mysql57 mysql57-server
sudo port select mysql mysql57
sudo port load mysql57-server
For read-only access:
git clone https://github.com/upcoming/upcoming-www
You probably want to fork the repo https://github.com/upcoming/upcoming-www and submit pull requests if you plan on making changes.
cd upcoming-www
npm install
node node_modules/unicode/install.js
cd upcoming-www
mysqladmin -u root -p create upcoming
mysql -u root -p upcoming < db/schema.sql
mysql -u root -p upcoming -e "SET GLOBAL sql_mode='STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION';"
- Twitter: https://apps.twitter.com/app/new
- Make sure you fill out an OAuth Callback (can be overridden in the local config). Something like
http://127.0.0.1:3000/auth/twitter/callback
is fine.
- Make sure you fill out an OAuth Callback (can be overridden in the local config). Something like
- Facebook: https://developers.facebook.com/quickstarts/?platform=web
- Foursquare: https://foursquare.com/developers/register
- Google Maps: https://console.developers.google.com/flows/enableapi?apiid=maps_backend,geocoding_backend,directions_backend,distance_matrix_backend,elevation_backend&keyType=CLIENT_SIDE&reusekey=true
Update the config/default.json
file:
{
"session_secret": "[SHA1DIGEST-OR-SIMILAR]",
"redis_password": "",
"database": {
"host": "localhost",
"database": "upcoming",
"user": "root",
"pass": "[YOUR-MYSQL-PASSWORD]"
},
"twitter": {
"consumer_key": "[REQUIRED]",
"consumer_secret": "[REQUIRED]",
"callback_url": "[OPTIONAL-OVERRIDE]"
},
"facebook": {
"app_id": "[FUTURE-REQUIRED]",
"app_secret": "[FUTURE-REQUIRED]"
},
"foursquare": {
"client_id": "[REQUIRED]",
"client_secret": "[REQUIRED]"
},
"google": {
"oauth_key": "[FUTURE-REQUIRED]",
"oauth_secret": "[FUTURE-REQUIRED]"
}
}
Note: The twitter callback_url
can either be specified in this file, or in the Twitter API token setup page. It should be http://YOUR_HOSTNAME_OR_IP:3000/auth/twitter/callback
- Edit
views/add.jade
and change the 6th line, removing the&key=AIzaSyB6e6ARbWZOETgBrJ54j3R0z7p93UzhYMQ
param and replacing it with&key=YOUR_GOOGLE_MAPS_API_KEY
You should be able to run bin/www
in the upcoming_www
folder. If successful, you should be able to go to
http://YOUR_HOSTNAME_OR_IP:3000
and view the site.
There are (too) many ways to make your life easier while developing (auto-reloading/watching for changes).
Here's one simple way.
Install supervisor
sudo npm install supervisor -g
Run in upcoming_www
supervisor bin/www