Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

icecream

Package Overview
Dependencies
Maintainers
1
Versions
67
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

icecream

rapid web framework for nodejs

  • 0.2.4
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
77
increased by1183.33%
Maintainers
1
Weekly downloads
 
Created
Source

##About##

Icecream is a rapid web framework based on NodeJS. It was designed with a very small footprint for those who need a simple, elegant and pragmatic toolkit to build high-performing, full-featured web applications.

the source code is hosted on github.com and licensed under the MIT license.

any question about icecream, please feel free to contact zhengzhiyu@yeah.net

##How to use##

####install nodejs####

####create your application####

  • open a shell prompt and type the following command

     mkdir myApp
     cd myApp
     
    
  • create application folders

     mkdir app
     mkdir app/controllers
     mkdir app/views
     mkdir app/views/layout
     mkdir app/views/page
    

####add icecream to the application####

  • add icecream module to your working directory

     cd myApp/app
     npm install icecream
    

####add files to the application####

  • create the main file start.js in directory 'myApp/'

     var icecream = require('icecream');
     icecream.createServer({
        appDir:__dirname +'/app'
     });     
     icecream.listen(3000);
            
    
  • create controller file page.js in directory 'myApp/app/controllers/'.

     action('index', function(){
         var data = {
             name: 'icecream',
             introduction: 'Icecream is a rapid web framework based on NodeJS. It was designed with a very small footprint for those who need a simple, elegant and pragmatic toolkit to build high-performing, full-featured web applications.'
         }
         render('index', data);
     })
    
  • create layout file layout.ejs in directory 'myApp/app/views/layout/'.

     <html>
        <head>
            <meta http-equiv="Content-Type",content="text/html; charset=utf-8">
            <title>welcome to icecream!</title>
        </head>    
        <body>
            <div class="main">
                <%-body%>   
            </div>
        </body>
     </html>
     
    

Note: icecream uses ejs as the default template engine, so 'ejs' is the default file name extention for views.

  • create view file index.ejs in directory 'myApp/app/views/page/'.

     <h2><%=name%></h2>
     <div><%=introduction%></div>
    

####run the application####

  • open a shell prompt and change directory to your applicaton

     cd /path to your application (myApp)
     node start.js 
    
  • open http://localhost:3000 in browser

Keywords

FAQs

Package last updated on 21 Feb 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc