UNPKG

blazepress

Version:

A rapid web application development platform for Node.js

41 lines (22 loc) 590 B
const Default = require( './services/Default' ) const Installer = require( './services/Installer' ) const lang = require( './lang' ).ns( 'Application' ) const fs = require( './fs' ) class Application extends Default { constructor( id ) { super( id ) try { this.config = require( fs.cwd().sub( 'blazepress.json' ).str ) } catch( err ) { this.services.add( new Installer ) } } set parent( parent ) { throw new Error( lang.get( 'applications_cannot_be_mounted', parent ) ) } get parent() {} start() { super.start() } } module.exports = Application