/etc/systemd/system/node_api
[Unit]
Description=API
After=network.target
[Service]
User=username
Environment=HOST=localhost
WorkingDirectory=/app
ExecStart=/usr/bin/node index.js
[Install]
WantedBy=multi-user.target
echo "deb http://repo.mysql.com/apt/ubuntu/ precise mysql-apt-config
deb http://repo.mysql.com/apt/ubuntu/ precise mysql-5.5" | sudo tee /etc/apt/sources.list.d/mysql.list
curl -s http://ronaldbradford.com/mysql/mysql.gpg | sudo apt-key add -
sudo apt-get update
sudo apt-get install mysql-server-5.5
if len(sys.argv) > 1:
print("~ name: " + sys.argv[0])
print("~ Args : " + sys.argv[1:])
else:
print("No arguments")