Code Monkey home page Code Monkey logo

web's Introduction

DADI Web

npm (scoped) coverage Build Status JavaScript Style Guide Greenkeeper badge

DADI Web

Overview

DADI Web is a high performance, schema-less templating layer built on Node.JS. it can operate as a stand-alone platform or in conjunction with DADI API as a full stack web application.

DADI Web makes it easy to build custom enterprise-grade Node.JS applications. Easily create static pages or connect to APIs to generate data-driven pages giving you the power to search, paginate, sort and filter your data.

DADI Web uses LinkedIn's Dust templating language which provides a simple yet powerful template layer for displaying your data. It has built in support for: Rotating log files, Nginx-style HTTP access logs, GZip compression, caching by mime-type, URL rewriting, database-backed sessions and more.

DADI Web is part of DADI, a suite of components covering the full development stack, built for performance and scale.

Requirements

  • Node.js (supported versions: 4.7.0, 5.12.0, 6.9.2)

Your first Web project

Install Web

All DADI platform microservices are available from NPM. To add Web to your project as a dependency:

$ cd my-app
$ npm install --save @dadi/web

As part of the installation process of the @dadi/web package, several files and folders were added to your project:

  • config/config.development.json
  • workspace/
  • server.js

This enables Web to boot straight out of the box with a default ‘blog’ style configuration and some suggestions of next steps. Start the server and open a browser to begin.

Start the server

With the server.js in the root of your application, Web can be started from the command line simply by issuing the following command:

$ npm start

With the default configuration, our Web server is available at http://localhost:3001. Visit this URL in your browser to see a 'Welcome' page.

Configuration

Web requires a configuration file specific to the application environment. For example in the production environment it will look for a file named config.production.json.

Configuration files live in a config folder in your application root, for example config/config.development.json. Web starts with a sensible default configuration, but you can find full configuration documentation at http://docs.dadi.tech/web/getting-started/configuration/.

Run Web as a service

To run your Web application in the background as a service, install Forever and Forever Service:

$ npm install forever forever-service -g

$ forever-service install -s server.js -e NODE_ENV=production web --start

You can now interact with the web service using the following commands:

$ [sudo] service web start
$ [sudo] service web stop
$ [sudo] service web status
$ [sudo] service web restart

Note: the environment variable NODE_ENV=production must be set to the required configuration version matching the configuration files available in the config directory.

Links

Licence

DADI is a data centric development and delivery stack, built specifically in support of the principles of API first and COPE.

Copyright notice
(C) 2017 DADI+ Limited [email protected]
All rights reserved

This product is part of DADI.
DADI is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version ("the GPL").

If you wish to use DADI outside the scope of the GPL, please contact us at [email protected] for details of alternative licence arrangements.

This product may be distributed alongside other components available under different licences (which may not be GPL). See those components themselves, or the documentation accompanying them, to determine what licences are applicable.

DADI is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

The GNU General Public License (GPL) is available at http://www.gnu.org/licenses/gpl-3.0.en.html.
A copy can be found in the file GPL.md distributed with these files.

This copyright notice MUST APPEAR in all copies of the product!

web's People

Contributors

jimlambie avatar adamkdean avatar eduardoboucas avatar josephdenne avatar magnusdahlstrand avatar greenkeeper[bot] avatar mingard avatar fra967 avatar kevinsowers223 avatar feroviktor avatar greenkeeperio-bot avatar snyk-support avatar

Watchers

James Cloos avatar Jassy Ningthoujam 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.