Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,23 @@ name: Test and lint

on:
push:
branches: [ master ]
branches: [master]
pull_request:
branches: [ master ]
branches: [master]

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x, 18.x]
node-version: [20.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: npm install
- run: npm run lint
- run: npm run test
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: npm install
- run: npm run lint
- run: npm run test
13 changes: 6 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
![nodegate](docs/assets/images/readme-logo.png)

The easy plugin to programmatically manage a horizontally scalable JSON API Gateway. Built on top of
[Express](url-express) & [Request](url-request).
[Express](url-express)

[![Test and lint][github-badge]][github-url]
[![Dependencies status][david-badge]][david-url]
[![Version][version-badge]][version-url]

```js
const nodegate = require('nodegate');
const gate = nodegate();
const { aggregate } = nodegate.workers;
const nodegate = require('nodegate')
const gate = nodegate()
const { aggregate } = nodegate.workers

gate.route({
method: 'get',
Expand All @@ -19,9 +19,9 @@ gate.route({
aggregate('get', 'https://api.github.com/users/{params.user}'),
aggregate('get', 'https://api.github.com/users/{params.user}/gists'),
],
});
})

gate.listen(8080);
gate.listen(8080)
```

## Usage
Expand Down Expand Up @@ -55,5 +55,4 @@ Copyright (c) Weekendesk SAS.
[version-badge]: https://badge.fury.io/js/nodegate.svg
[version-url]: https://badge.fury.io/js/nodegate
[url-express]: https://expressjs.com/
[url-request]: https://github.com/request/request
[url-wiki-api-management]: https://en.wikipedia.org/wiki/API_management
13 changes: 13 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
module.exports = {
testEnvironment: 'node',
testEnvironmentOptions: {
experimentalFetch: true,
},
collectCoverageFrom: [
'**/*.js',
'!**/node_modules/**',
'!**/vendor/**',
'!**/coverage/**',
'!**/assets/**',
],
};
Loading