Giter VIP home page Giter VIP logo

dhtmlplus.node's Introduction

DHTMLPlus.node

DHTMLPlus is an HTML Framework built for nodeJS, It has support for Azure. It is designed to help Web Developers build websites quickly and intergrate nodeJS at thier own pace.

DHTMLPlus has several modes

DHTMLPlus Mode

DHTMLPlus uses HTML pages as templates and JSON files for content. Cheerio is used to merge in data and content serverside. Templates and content are stored seperate from the base code in Azure Blob Storage or local dir. This allows one code base to support unlimited sites.

AngularJS Mode

WinJS Mode

Static Mode

Guides / How-to's

DHTMLPlus.node wiki Guides and detailed help topics.

Development Setup

In your code folder, create a file called local.js

exports.devKeys = {
	"AZURE_STORAGE_ACCOUNT": "name here",
	"AZURE_STORAGE_ACCESS_KEY":"key value here",
	"port": 80,
	"useCloudData": false,
	"useCluster": true
};
/* settings for video streaming */
exports.video = {
	settings: {
		"AZURE_STORAGE_ACCOUNT": "name here",
		"AZURE_STORAGE_ACCESS_KEY":"key value here",
		tmdbApiKey: "key value here",
		template : {
			PartitionKey : "movie",
			RowKey: 0,
			update: false,
			own: false,
			MyDb: "0",
			TMDb: 0,
			IMDb: "",
			popularity: 0,
			adult: false,
			name: "",
			nameSort: "",
			type: "",
			overview: "",
			rating: "",
			certification: "",
			url: "",
			released: "",
			runtime: "",
			homepage: "",
			poster: "/images/no-poster.jpg",
			backdrop: "",
			tagline: "",
			collection: {},
			categories: {},
			keywords: {},
			cast: {},
			backdrops: {},
			filePath: "",
			virtualPath: "",
			file: ""
		}
	},
	transcode: {
		"mp4": "mp4",
		"avi": "webm",
		"mkv": "webm",
		"mkv": "webm",
		"m4v": "webm"
	},
	paths: {
		"movies": "M:/Movies",
		"movies-3d": "M:/Movies-3D"
	},
	pathTypes: {
		"movies": "movie",
		"movies-3d": "movie-3D"
	}
};

In your code folder, modify config.js for your environments

exports.config = {
	"LOCAL": {
		endpoint: {
			"azurewebsites.net": { subDomain: "hasissues", port: 80 },
			"hasissues.com": { subDomain: "preview", port: 80 },
			"sneakerz.com": { subDomain: "www", port: 80 }
		},
		redirect: {
			"sneakerz.com": { subDomain: "", subDomainPort: 80, directTo: "www", directToPort: 80 }
		}
	},
	"AZURE": {
		endpoint: {
			"azurewebsites.net": { subDomain: "hasissues", port: 80 },
			"hasissues.com": { subDomain: "www", port: 80 }
		},
		redirect: {
			"hasissues.com": { subDomain: "", subDomainPort: 80, directTo: "www", directToPort: 80 }
		}
	}
};

Development

  • create a DNS/Host entry for preview.your-site.com that points to your development machine.

Template Setup

  • Create a templates folder in you code folder and Exclude from git
  • Create a sub folder for each website. Example: hasissues-com.
  • the default page should be home.htm
<html>
<head fullPage="true" masterPage="MasterPage" codebehind="true">
</head>
<body>
	<h1 id="content_01" contentEditable="true">New H1 Title Text</h1>
	<p id="content_08" contentEditable="true">New Paragraph Text</p>
	<h2 id="content_News_title" contentEditable="true">Title</h2>
	<ul id="content_News" contentEditable="true"><li>Current</li></ul>
	<div style="clear:both;"></div>
</body>
</html>

Server Side Code Behind

Code Behind lets you create server side script to execute on your templates. In the site template folder, create a js file with the same name as your template file. Example home.js for the code behind for home.htm

var codebehind = function($, path, response) {
	$("span.issues").html("ISSUES");
};

Publishing Site Templates

Publish only works from your LOCAL node server.

  • Create a Azure Blob Storage folder with the name of your site. Example: hasissues-com.
  • Browse to preview.your-site.com/publish.htm, this will publish your site to your blob storage account.

dhtmlplus.node's People

Contributors

hasissues avatar

Watchers

Michael Onubogu 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.