Base System: Readme
This is the base package for the alinex namespace. Currently only some helpers are contained here.
It is not made to be used for other modules. Currently it contains:
- the app logo (for console)
- error management
Read more about the philosphy behind.
Read the complete documentation under https://alinex.github.io/node-core.
Install
API Integration
To do this you install it into your own module:
# from within your module directory
sudo npm install --save alinex-core
Usage
Logo
You can get an logo easily to be printed on the console with the application title included:
alinex = require 'alinex-core'
logo = alinex.logo 'Development Helper'
console.log logo
Error Management
The following code will setup handler for SIGNAL handling and also give you a handy method for exit the program with code and message.
alinex = require 'alinex-core'
alinex.initExit()
alinex.exit 1, new Error "Something went wrong"
This will:
- output the error
- output a possible err.description property
- exit the process with the given code
You can find the possible codes for alinex in in the description of the Error Management.
See the separate pages for the {@link index.coffee} for more details.
Alinex Modules
Look at my Code page (button on the top) to get a list of currently finished modules.
License
(C) Copyright 2016 Alexander Schilling
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.