eureka-js-connection
Advanced tools
Comparing version 0.0.2 to 0.0.3
@@ -1,2 +0,1 @@ | ||
// http://localhost:8761/ | ||
const axios = require('axios') | ||
@@ -3,0 +2,0 @@ const { prop } = require('ramda') |
{ | ||
"name": "eureka-js-connection", | ||
"version": "0.0.2", | ||
"version": "0.0.3", | ||
"description": "Example using netflix eureka", | ||
@@ -26,4 +26,6 @@ "main": "index.js", | ||
"devDependencies": { | ||
"ava": "^3.2.0" | ||
"ava": "^3.2.0", | ||
"finalhandler": "^1.1.2", | ||
"serve-static": "^1.14.1" | ||
} | ||
} |
@@ -1,2 +0,21 @@ | ||
# eureka-js-connection | ||
# Eureka-js-connection | ||
Example using netflix eureka | ||
# Usage | ||
```js | ||
const getAllServices = require('eureka-js-connection') | ||
getAllServices() | ||
.then(console.log) | ||
.catch(console.error) | ||
``` | ||
or with port | ||
```js | ||
const getAllServices = require('eureka-js-connection') | ||
getAllServices(8761) | ||
.then(console.log) | ||
.catch(console.error) | ||
``` |
13
test.js
const test = require('ava') | ||
const getAllServices = require('./') | ||
const getAllServices = require('./index') | ||
const finalHandler = require('finalhandler') | ||
const http = require('http') | ||
const serveStatic = require('serve-static') | ||
const port = 8761 | ||
http | ||
.createServer((req, res) => | ||
serveStatic('./test')( | ||
req, res, finalHandler(req, res))) | ||
.listen(port) | ||
test('getAllServices', async t => { | ||
@@ -5,0 +16,0 @@ const services = await getAllServices(8761) |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
71891
14
34
22
3
1