1.0.2 • Published 9 years ago

sam_l v1.0.2

Weekly downloads
1
License
MIT
Repository
-
Last release
9 years ago
I'm Sam L...... 

Sam_L is a Server Engine just like express, currently it's in beta yet can be extremely useful. Sam_L is part of a collection of software I'm releasing soon that will gerneate a full stack for you based off of the model passed in. More coming soon!

Future Sam_L Updates Include :
    Token Web Authenticaiton

Sam_L is open source and help from the community would be loved.

If you are a fan of Sam_L and would like to see more open source software please donate to my bitcoin address :

1FV6mKkNfMR6WdfdLcYDGgtXTJV7ZpQaEC

Here are some examples of how to use Sam_L

server.js

(function(){
    var http = require("http");
    const PORT = process.env.PORT;
    const HOST = process.env.IP;
    var SL = require("sam_l");
    
    require("./routes.js");
    
    var server = http.createServer(SL);
 
    server.listen(PORT, HOST, function(){
        console.log("Server On");
    });
})();

routes.js

(function(){
    var SL = require("Sam_L");
    module.exports = function(){
        
        SL.GET("Home", function(req,res){
            var model { title: "Sam L" };
            SL.RenderPage(res,"home.html", model);
        });
        
        SL.POST("Home", function(req,res,data){
                var model = { uri: newUser.UserName };
                SL.RenderPage(res,"thankyou.html", model);
        });
        
    };
})();

Templates that are passed into the SL.RenderPage are in a specific file location developed mainly in c9, updates for dynamic location coming soon.

To use the view engine use Rick_J

https://www.npmjs.com/package/rick_j
1.0.2

9 years ago

1.0.1

9 years ago

1.0.0

9 years ago