GithubHelp home page GithubHelp logo

dlsso / njax-util Goto Github PK

View Code? Open in Web Editor NEW

This project forked from schematical/njax-server-util

0.0 1.0 0.0 137 KB

Utilities shared between the primary platform and the various apps

License: Apache License 2.0

JavaScript 99.71% HTML 0.29%

njax-util's Introduction

njax-util

NJax-Util is a package of code that is used in both NJax's core module and NJax's child service module. The majority of documentation for the NJax Framework can be found at http://github.com/schematical/njax.

##Usage: This repo is meant to be included as a child module of the aforementioned repos and not really recommended to be included directly into your projects.

##Anatomy:

###./lib: The backend files that run on the server as part of this node_module.

####./lib/routes: A collection of routes available to all NJax based modules

#####./lib/routes/middleware.js: A series of middleware that runs on every request to an NJax app.

NOTE: Some of this needs to be moved to a middleware that can be called in the app.js of a project built off of the NJax framework.

#####./lib/routes/error.js: A bit of basic error handling middleware

#####./lib/routes/_s3.js: A collection of functionality for working with Amazon Web Service's S3 Buckets

####./lib/modules: Some modules that are shared between the core and its child services.

#####./lib/modules/cache.js: The Cache module is a value key store that stores data in process memory that gets updated when an Event is fired off from the core (//TODO: Link to the events section in Njax's Core)

#####./lib/modules/cookie_session.js: NOTE: Cookie Session is no longer in use Cookie session was a simple way of storing an encrypted cookie with session data in it.

#####./lib/modules/child_process: Child process has modules for launching child processes external from the parent process. This is most commonly used for firing off Web Hooks from the core, but can have other uses as well.

#####./lib/modules/crypto.js: This handles basic encryption

#####./lib/modules/helpers.js: Helpers are a collection of simple utility functions that were not included in underscore.js

#####./lib/modules/hjs.js: HJS has some basic functionality for working with templates using hjs.

#####./lib/modules/https.js: This has some simple functions for enforcing https vs http and dealing with multiple protocols

#####./lib/modules/mongo_session.js: This is has the functionality that stores basic user session in MongoDB.

NOTE: This has it's own config setting session_mongo so you can store this data that does NOT need to persist long term in a separate db. This takes some of the load off of your long term db.

NOTE 2: I know connect has a session tool for this but it was not cutting it for what I wanted it for

#####./lib/modules/mongoose.js: This ques up mongoose and our data layer model. It does not initialize the actual Schema's though. That happens in the applications and in some cases NJax Core

#####./lib/modules/s3.js: This has more model(not control) functionality for use with the S3 Buckets

#####./lib/modules/static_serve.js: NJax has the ability to make static assets extendable.

//TODO: Write example

njax-util's People

Contributors

dlsso avatar schematical avatar

Watchers

 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.