Socket
Socket
Sign inDemoInstall

adon-api

Package Overview
Dependencies
102
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.0.1 to 2.1.0

dist/src/config/index.d.ts

4

dist/src/index.d.ts

@@ -1,2 +0,2 @@

export { ExpressApp, ExpressAppConfig } from './libs/ExpressApp';
export { default as EnvConfig } from './libs/ConfigHelper';
export { ExpressApp, ExpressAppConfig } from './ExpressApp';
export { default as config } from './config';

@@ -6,7 +6,7 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.EnvConfig = exports.ExpressApp = void 0;
var ExpressApp_1 = require("./libs/ExpressApp");
exports.config = exports.ExpressApp = void 0;
var ExpressApp_1 = require("./ExpressApp");
Object.defineProperty(exports, "ExpressApp", { enumerable: true, get: function () { return ExpressApp_1.ExpressApp; } });
var ConfigHelper_1 = require("./libs/ConfigHelper");
Object.defineProperty(exports, "EnvConfig", { enumerable: true, get: function () { return __importDefault(ConfigHelper_1).default; } });
var config_1 = require("./config");
Object.defineProperty(exports, "config", { enumerable: true, get: function () { return __importDefault(config_1).default; } });
//# sourceMappingURL=index.js.map
{
"name": "adon-api",
"version": "2.0.1",
"version": "2.1.0",
"description": "API for all Adon-based projects",

@@ -11,6 +11,10 @@ "main": "dist/src/index.js",

"scripts": {
"build": "tsc",
"start": "node dist/src/sample.js",
"start:dev": "ts-node sample",
"test": "jest"
"start:server": "nodemon --config nodemon.json --exec ts-node sample/index.ts",
"audit": "npm audit",
"lint": "eslint \"src/**/*.ts\"",
"snyk": "snyk test",
"test": "jest --logHeapUsage",
"test:coverage": "jest--logHeapUsage --coverage",
"coveralls": "jest --logHeapUsage --coverage && cat ./coverage/lcov.info | coveralls",
"build": "tsc"
},

@@ -32,27 +36,39 @@ "repository": {

"dependencies": {
"body-parser": "^1.19.0",
"cors": "^2.8.5",
"dotenv": "^8.2.0",
"express": "^4.17.1",
"helmet": "^4.2.0",
"http-error-types": "^1.0.1",
"ioredis": "^4.19.2",
"logger-template": "^1.0.1",
"rate-limiter-flexible": "^2.2.1",
"winston": "^3.3.3"
"@godaddy/terminus": "4.7.1",
"body-parser": "1.19.0",
"cors": "2.8.5",
"dotenv": "8.2.0",
"express": "4.17.1",
"helmet": "4.4.1",
"http-error-types": "1.0.1",
"ioredis": "4.26.0",
"morgan": "1.10.0",
"rate-limiter-flexible": "2.2.1",
"rc": "^1.2.8",
"winston": "3.3.3"
},
"devDependencies": {
"@types/cors": "^2.8.10",
"@types/express": "4.17.3",
"@types/helmet": "0.0.45",
"@types/ioredis": "^4.17.8",
"@types/node": "^14.14.12",
"@types/winston": "^2.4.4",
"@typescript-eslint/eslint-plugin": "^4.19.0",
"@typescript-eslint/parser": "^4.19.0",
"eslint": "^7.22.0",
"eslint-config-airbnb-typescript": "^12.3.1",
"eslint-plugin-import": "^2.22.1",
"typescript": "^4.1.2"
"@types/cors": "2.8.10",
"@types/express": "4.17.11",
"@types/helmet": "4.0.0",
"@types/ioredis": "4.22.3",
"@types/jest": "26.0.22",
"@types/morgan": "1.9.2",
"@types/node": "14.14.37",
"@types/rc": "1.1.0",
"@types/supertest": "^2.0.11",
"@types/winston": "2.4.4",
"@typescript-eslint/eslint-plugin": "4.21.0",
"@typescript-eslint/parser": "4.21.0",
"eslint": "7.24.0",
"eslint-config-airbnb-typescript": "12.3.1",
"eslint-plugin-import": "2.22.1",
"jest": "26.6.3",
"nodemon": "2.0.7",
"snyk": "1.522.0",
"supertest": "6.1.3",
"ts-jest": "26.5.4",
"ts-node": "9.1.1",
"typescript": "4.2.4"
}
}

@@ -1,4 +0,11 @@

# ADON-API
# adon-api
Express JS + Typescript + Jest development made easier. The goal is for us to easily build websites or APIs without managing the same dependencies and breaking out of our standards and conventions each time. We follow convention and configuration over code so that all future projects are handled easily.
## Project stats
* Package: [![npm](https://img.shields.io/npm/v/adon-api.svg)](https://www.npmjs.com/package/adon-api) [![npm](https://img.shields.io/npm/dm/adon-api.svg)](https://www.npmjs.com/package/adon-api)
* License: [![GitHub](https://img.shields.io/github/license/adonisv79/adon-api.svg)](https://github.com/adonisv79/adon-api/blob/master/LICENSE)
* CICD: [![Codacy Badge](https://app.codacy.com/project/badge/Grade/8308805088ac436b82f87e48a48633a1)](https://www.codacy.com/gh/adonisv79/adon-api/dashboard?utm_source=github.com&utm_medium=referral&utm_content=adonisv79/adon-api&utm_campaign=Badge_Grade) [![Known Vulnerabilities](https://snyk.io/test/github/adonisv79/adon-api/badge.svg)](https://snyk.io/test/github/adonisv79/adon-api)
* develop: [![Build Status](https://www.travis-ci.com/adonisv79/adon-api.svg?branch=develop)](https://www.travis-ci.com/adonisv79/adon-api) [![Coverage Status](https://coveralls.io/repos/github/adonisv79/adon-api/badge.svg?branch=develop)](https://coveralls.io/github/adonisv79/adon-api?branch=develop)
* master: [![Build Status](https://www.travis-ci.com/adonisv79/adon-api.svg?branch=master)](https://www.travis-ci.com/adonisv79/adon-api) [![Coverage Status](https://coveralls.io/repos/github/adonisv79/adon-api/badge.svg?branch=master)](https://coveralls.io/github/adonisv79/adon-api?branch=master)
## How it works?

@@ -9,2 +16,5 @@ * Express JS - our core framework is based on express and so this module will provide a library to easily kickstart an express js web service.

* Rate Limitter, helm, etc - security mechanism as recommended from express (https://expressjs.com/en/advanced/best-practice-security.html)
* Winston + Morgan - default logger mechanism
* RC and DOTENV for configuration
* @godaddy/terminus for healthcheck and handling graceful termination of the service

@@ -59,5 +69,6 @@ ## Installation

### Environment configurations
As best practice, the service insist on setting your service level and security risk configurations within the environment. The EnvConfig module uses the dotEnv module to load all environment variables in a .env file which populates the config with all environment variables.
* PORT - sets the prot number where the service will listed to. (Default: 3000)
* SERVER_CORS_ALLOWED_ORIGINS - sets the allowed request origins urls. multiple URLs are divided by semicolon. (Default: '*')
Create a file named '.env' in the root of the application. enter the following
Either set in your machine environment the values or create a file named '.env' in the root of the application then enter the following
```text

@@ -67,2 +78,3 @@ PORT=3000

```
You can add more configurations here as much as you like and they can be accessed in code as

@@ -69,0 +81,0 @@ ```javascript 1.6

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc