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

oils

Package Overview
Dependencies
Maintainers
1
Versions
117
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

oils - npm Package Compare versions

Comparing version 0.1.6 to 0.1.7

6

package.json
{
"name": "oils",
"version": "0.1.6",
"description": "Oils Js framework built on top of Express.",
"version": "0.1.7",
"description": "Oils js framework built on top of Express.",
"keywords": [

@@ -17,3 +17,3 @@ "OilsJs",

},
"homepage": "https://github.com/mannyvergel/oils-js",
"homepage": "http://mannyvergel.github.io/oils-js",
"repository": {

@@ -20,0 +20,0 @@ "type": "git",

oils
======
### Oils JS
### What is Oils JS
Oils is a web framework built on top of Express framework. It's very flexible and very simple to use, you'll love it!
Oils is a web framework built on top of Express framework. It's very flexible and very simple to use, you'll love it!
It is primarily used to create Openshift Node JS Applications. You can also use this for other projects as the variable dependencies are just very few and are all in the configuration file.
The reason why Oils framework was created is because the author wants a framework that just works; framework that is very close to Express, organized, highly intuitive and uses basic html, css, and javascript.
It will automatically read models and controllers. Also features automatic routing for created controllers.
The author is **NOT** a fan of the ff:
* using non-html syntax on the front-end
* forcing to use sass / other css frameworks
* forcing non standard javascript syntax
* complicated build procedures before you can run the app
The default configuration is for running on local machine and on Openshift servers but it's configurable in conf.js.
Directory Structure:
|-- controllers
|-- models
|-- views
|-- public
|-- lib
|-- conf //configuration
|-- controllers //controllers
|-- lib //custom modules
|-- models //models
|-- public //assets like css, js, images
|-- views //uses swig
You can see the README.md's of each directory above for more information.
### Components
Oils js uses Mongoose for ORM, Mongo DB for the database and Swig for templating. Only Mongo DB is supported for now but this may change in the future depending on the needs.
For the default templating, Swig has been chosen because it doesn't mess much with the html syntax. You can override this by setting the attributes of app.server before calling app.start(), however, do this at your own risk as future features may not support custom template engines (e.g. scaffolding).
### Features
The follow are motivations behind creating Oils Js Framework:
+ Intuitive MVC approach
+ Automatic routing of controllers
+ Organized folder structure
+ Automatic creation of models and controllers
+ Uninterrupted Mongo DB Connection (auto reconnect)
+ Support for multiple database connections
+ Uninterrupted server when there's an exception
Future Features:
+ Scaffolding
+ Helper Functions
+ Support for SQL DB
### Set-Up
For OpenShift apps, after creating your node js + mongodb application, clone the project to your local and go to that directory.
This assumes you already have Node JS v0.10.x (or higher) installed.
Example:
```

@@ -40,4 +70,2 @@ > npm install oils -g

or you can just simply Download the zip version of this project and copy-paste it to your node js application.
### Usage

@@ -47,4 +75,11 @@

It uses Mongoose for ORM. Mongo DB for the database. Swig for templating.
Example:
After you have set-up a new oils project.
* Go to controllers folder.
* Create a controller. e.g. test.js
* Restart server.
* Access your controller with your browser: http://localhost:8080/test
### Contact

@@ -51,0 +86,0 @@

#!/bin/env node
var app = require('oils');
app.start();
//additional server configuration if needed before starting
//var server = app.server; //express server
app.start();
//so the server won't stop when there's an exception
//you can remove this if needed.
process.on('uncaughtException', function(err) {
console.log('Caught exception: ' + err);
if (err) {
console.error(err.stack);
}
});

Sorry, the diff of this file is not supported yet

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