Giter Site home page Giter Site logo

invoise-web's Introduction

Invoise

Invoice generator hobby project.

#Production Machine

Connect: ssh [email protected]

#Domain Name

Server

invoise.com registered on namecheap.com

Ubuntu 12.04 LTS seems to be a good choice.

Deploy

The project lies in ~/projects/invoise-web. The latest version can be fetched from GitHub with git pull

Nohup is used to run it.

If you have another version running, you must start by killing it.

To kill it: ps aux, find nohup/node process id and kill <id>.

On a development machine, just type:

node app.js

On a production machine port 80 needs to be specified and sudo may be required to bind to this port.

sudo PORT=80 node app.js

Nohup is used to get it running after logging out from shell.

sudo PORT=80 nohup node app.js &

Dependencies

wkhtmltopdf

Uses x system and handles fonts better then phantom.

phantomjs-node (deprecated)

https://github.com/sgentle/phantomjs-node

Phantom needs to be installed on machine sudo apt-get install phantomjs

You may get errors though, like "cannot connect to X server" https://github.com/yeoman/yeoman/issues/446

Solution: Download the latest binary from here: http://phantomjs.org/download.html And replacing: /usr/bin/phantomjs

To get where it's installed, you can have look at: dpkg -L phantomjs

Fonts on Ubuntu

Ubuntu doesn't come with many fonts, have a look with `fc -list?

To install basic fonts there is a Microsoft font package.

To install:

  1. first you need to enable multiverse repo in Ubuntu. sudo vim /etc/apt/sources.list
  2. sudo apt-get update
  3. sudo apt-get install ttf-mscorefonts-installer
  4. Liberation Sans is pretty good option and renders decently on Linux. http://graphicdesign.stackexchange.com/questions/8827/helvetica-neue-equivalent-on-google-web-fonts

Raw install log

Amazon EC2
Ubuntu 12.04 LTS 64-bit


sudo vim /etc/apt/sources.list
sudo apt-get update
sudo apt-get install phantomjs (needed?)
sudo apt-get install git

Install node (requires extra repo to be added)
https://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager#ubuntu-mint

Copy GitHub keys from local:
scp ~/.ssh/amazon [email protected]:~/.ssh/id_rsa
scp ~/.ssh/amazon.pub [email protected]:~/.ssh/id_rsa.pub

mkdir projects
cd projects
git clone [email protected]:antonholmquist/invoise-web
cd invoise-web/

npm install
// On dependency error, remove the node modules directory and try again

// Install x server 
sudo apt-get install xvfb
sudo apt-get install wkhtmltopdf

// Use latest phantomjs
scp /Users/antonholmquist/Downloads/phantomjs-1.9.1-linux-x86_64\ 2/bin/phantomjs [email protected]:~/

sudo mv ~/phantomjs /usr/bin/phantomjs

// Microsoft core fonts
sudo apt-get install ttf-mscorefonts-installer

invoise-web's People

Contributors

antonholmquist avatar

Watchers

James Cloos avatar  avatar  avatar

invoise-web's Issues

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.