Con unos simples pasos lograremos hacer que nuestras apps Node.js se inicien en cada arranque de nuestro servidor:
- Logueate en tu servidor y accede a la carpeta /etc/init.d
> $ cd /etc/init.d
<IfModule mod_ssl.c> | |
<VirtualHost _default_:443> | |
ServerAdmin webmaster@localhost | |
DocumentRoot /var/www/html | |
# Available loglevels: trace8, ..., trace1, debug, info, notice, warn, | |
# error, crit, alert, emerg. | |
# It is also possible to configure the loglevel for particular | |
# modules, e.g. |
#!/bin/bash | |
# Ubuntu Developer Script For Ionic Framework | |
# Created by Nic Raboy | |
# http://www.nraboy.com | |
# | |
# | |
# Downloads and configures the following: | |
# | |
# Java JDK | |
# Apache Ant |
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> | |
<widget id="com.pilotosbarranquilla.pilotos" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0"> | |
<name>Pilotos Mobile</name> | |
<description> | |
Pilotos de barranquilla es una aplicación que ayuda a gestionar las operaciones fluviales de puertos. | |
</description> | |
<author email="[email protected]" href="http://soluntech.com"> | |
</author> | |
<content src="index.html"/> |
<!doctype html> | |
<html> | |
<head> | |
<!-- Run in full-screen mode. --> | |
<meta name="apple-mobile-web-app-capable" content="yes"> | |
<!-- Make the status bar black with white text. --> | |
<meta name="apple-mobile-web-app-status-bar-style" content="black"> |
server { | |
listen 80 default_server; | |
listen [::]:80 default_server ipv6only=on; | |
root /home/gomosoft/app/front; | |
index index.html index.php index.htm; | |
# server_name server_domain_name_or_IP; | |
location / { |
#!/bin/sh | |
# Ubuntu Developer Script For Ionic Framework | |
# Created by Nic Raboy | |
# http://www.nraboy.com | |
# | |
# | |
# Downloads and configures the following: | |
# | |
# Java JDK | |
# Apache Ant |
(function($){ | |
$.fn.Focus = function(){ | |
$(this).focus(); | |
$(this).attr('autofocus',''); | |
} | |
$(function(){ |
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc | |
. ~/.bashrc | |
mkdir ~/local | |
mkdir ~/node-latest-install | |
cd ~/node-latest-install | |
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1 | |
./configure --prefix=~/local | |
make install # ok, fine, this step probably takes more than 30 seconds... | |
curl https://www.npmjs.org/install.sh | sh |
Con este pequeño código haremos un autodespliegue de nuestro repositorio en nuestro servidor. Debemos tener instalando Node.js con Npm (Instalar nodejs y npm), también es necesario GIT (Instalar Git) previamente. Luego podemos seguir con las instruciones.
Instruciones: