Skip to content

Instantly share code, notes, and snippets.

@nztim
Last active March 14, 2024 04:51
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 7 You must be signed in to fork a gist
  • Save nztim/68824b729aef5ffce2c4 to your computer and use it in GitHub Desktop.
Save nztim/68824b729aef5ffce2c4 to your computer and use it in GitHub Desktop.
Install StackEdit on Ubuntu 14.04

###Install Node and Bower

  • Set up the NodeSource repo and install Node
  • curl -sL https://deb.nodesource.com/setup_0.12 | sudo bash -
  • sudo apt-get install nodejs
  • Install bower: sudo npm install -g bower

Install StackEdit

  • Clone the repo: git clone https://github.com/benweet/stackedit
  • To use a domain other than 'localhost', edit /public/res/constants.js:
    • constants.BASE_URL = "http://stackedit.dev:3000/";
  • Inside stackedit run npm install and bower install

Start and daemonize the Node server

  • Install PM2: sudo npm install pm2 -g
  • Start Stackedit via PM2: pm2 start server.js
  • Set it to run on boot: pm2 startup server where server is the App name shown from the previous command
  • You will be asked to run a command in the console, copy/paste and run it to add the startup scripts

Usage

  • Open your browser to http://hostname:3000

References

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment