Progetti

Mercusa | Htaccess-generator | nodeMVC

MercUsa

MercUsa è un ambizioso progetto per la realizzazione e manutenzione di un software gestionale Open Source per mercatini o negozi dell'usato. Ottimizzato sulla base delle normative fiscali italiane, nello specifico il Regime del Margine.

La gestione del progetto di sviluppo, open-source, è affidata a SourceForge, con una pagina dedicata che ne organizza i Forums e i Wikis.
Anche i codici sorgenti dunque, sono gestiti su questa piattaforma tramite SVN (subversion), le indicazioni sono le seguenti:

1) effettuare un checkout iniziale di tutto il progetto, con l'ultima versione sempre aggiornata;

svn checkout svn://svn.code.sf.net/p/mercusa-software-mercatino/svn/ mercusa-software-mercatino-svn

2) mantenere i sorgenti sempre aggiornati sulla directory principale in locale;

svn update

Il sito ufficiale di MercUsa è: http://www.mercusa.it




htaccess-generator

../Progetti | Downloads

htaccess-generator is a NodeJS project.
htaccess-generator is a command-line software to generating file .htaccess for your web-server simply passing parameters and arguments.


USAGE:


htgen [OPTION1] [OPTION2]... arg1 arg2...
The following options are supported:
-w, --www [ARG1] Redirects example.com to www.example.com
-o, --oldfile [ARG1] [ARG2] Redirects 301 old-file.html to new-file.html
-O, --olddir [ARG1] [ARG2] 301 Redirect Entire Directory old-dir/ to new-dir/
-c, --cache [ARG1]...[ARGN] Cache System with separate arguments for extensions
-p, --cachepublic Option PUBLIC in cache system
-P, --cacheprivate Option PRIVATE in cache system
-b, --blockhtaccess Prevent viewing of .htaccess file
-B, --blockdirindex Prevent directory listings
-d, --defaultindex [ARG1] Change default directory page


USE CASE:
I personally use this tool to generate file .htaccess directly.
./htgen -w example.com > .htaccess

... And put this file in home directory of example.com website. Ready-To-Use!

DOWNLOAD:


In the source code version you have to install a module of dipendence:
npm install stdio

SETUP:
After download binary, if you want to install htgen as a command-line default program, use this:
sudo ln -s /dir/where/htgen-file/is /usr/bin/htgen
Password: (digit your root password)
Ok, now you can launch command htgen from any positions (and directories) in your command-line.




nodeMVC

../Progetti | Downloads

nodeMVC is a minimalistic Model Views Control in Node.JS that uses the minimum energy in the server machine to make up a Web Site very fast and light.
The gol of nodeMVC is the minimal source code in the project and the easy configuration to run.

THE PROJECT:
nodeMVC is one server file and your contents are stored in files dot ejs (.ejs).
After you have downloaded this project file (node.js), you have to put this in your main website directory and then you have to make new directory, in the same place, named views.
In /views directory you can write your first web page:
echo "Hello Bob website" > index.ejs
Now you have to satisfy dipendences. nodeMVC use the framework Express and the EJS template engine to work. So, in the main directory of website (where you have put the node.js file) launch this command to setup the environment:
npm install express
npm install ejs
No databases are required.
Test your website. Now you are ready, your website is setup. To run launch:
nodejs node.js

#now the server is listening...

Open your web browser, go to: http://localhost:8080 and see your first webpage.

To work with nodeMVC you are free to use pure HTML language in the .ejs files (in views directory), and the EJS template engine language to make it dynamics. One instruction you'll have to use is include, with the EJS language you can include one .ejs file in another .ejs file in this way:
html
body

% include file %

file principale
/body
/html

This instruction include a file named file.ejs (in the same directory of main file) in this main file (es: index.ejs).

DOWNLOAD & CODE

Here you can find source code of nodeMVC and I suggest to use git for clone this project and stay updated, for future release and development, just with:
git clone https://github.com/nuke86/nodeMVC.git




Questo sito utilizza il Model-View-Controller open source nodeMVC