Code Monkey home page Code Monkey logo

drawme's Introduction

#Drawme A little SVG based drawing program using Mongo and NodeJs (with Express) on the back, and Jade Templates and Google Closure JS on the front.

###Become root

sudo su -

###Get some basic build tools onto the box

apt-get update
apt-get upgrade
apt-get install git-core build-essential openssl libssl-dev pkg-config figlet python-setuptools

###Get and install node from source

cd /usr/local/src
git clone git://github.com/nodejs/node.git 
cd node
git checkout v0.12.7-release
./configure
make
make install

###Install PM2 (For process management of node applications)

npm install pm2@latest -g

###Get and install Mongo DB

apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv EA312927
echo "deb http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.2 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.2.list
apt-get update
apt-get install -y mongodb-org

###Get and install Oracle Java - Needed to compile the JS

add-apt-repository ppa:webupd8team/java
apt-get install oracle-java8-installer
java -version

###Finally install the drawme app.

cd /opt
git clone https://github.com/gumm/drawme.git

###Use the projects scripted build tools to build and compile

cd drawme/
npm run-script build
npm run-script compile

###Create a settings_local.json file for stuff that is deploy specific

vi settings_local.json
    {
      "jsIsCompiled": true,
      "mailUser": "[email protected]",
      "mailPass": "strongpassword",
      "siteUrl": "http://localhost:3000"
    }

###Start Mongo

service mongod start

###Start the app using PM2 as process manager

pm2 start /opt/drawme/bin/www --name drawme --watch --log-date-format="YYYY-MM-DD HH:mm:ss.SSS" --max-memory-restart 200M
pm2 save

####Useful PM2 Commands for updating and service and log monitoring

pm2 pull drawme
pm2 logs
pm2 monit

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.