Giter Site home page Giter Site logo

nodemvc's Introduction

nodeMVC

This README would document whatever steps are necessary to get your web site up and running with nodeMVC.

What is this repository for?

  • 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 work.
  • ver: 0.1 alpha

How do I get set up?

  • 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:
#!bash

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:
#!bash

npm install express
npm install ejs
  • No databases are required.
  • Test your website. Now you are ready, your website is setup. To run launch:
#!bash

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:
#!java
<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).

  • Demo: you can see nodeMVC in action through my Personal Site, entirely created with nodeMVC, at www.dariofadda.it.

Contribution guidelines

  • Routes system: the URLs route in nodeMVC is very simple. After you store a file (.ejs) in /views directory, this file is already available on the server (no server restart is required). To point via web browser a web page stored in views directory you have to write, after http://localhost:8080/ the name of the file you want to point without extension. Es: if you have a file (views/gino.ejs), you go to: http://localhost:8080/gino. For index.ejs file you can write 'index' or nothing '/'.

Who do I talk to?

nodemvc's People

Contributors

nuke86 avatar

Watchers

James Cloos avatar  avatar

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.