-
Notifications
You must be signed in to change notification settings - Fork 138
Support multiple routes per path #126
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
d43d764
Support multiple routes per path
e49b31d
Add command-line debug instructions
489cb39
Update internal/nginx/modules/README.md
kate-osborn f6701fd
Update debug command
49d8c45
Change function names
692b514
Add 404 example curl
e9e6a20
Don't generate http_matches unnecessarily
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -80,7 +80,7 @@ jobs: | |
uses: rutajdash/[email protected] | ||
with: | ||
config_path: ${{ github.workspace }}/internal/nginx/modules/.prettierrc | ||
file_pattern: ${{ github.workspace }}/internal/nginx/modules/*.js | ||
file_pattern: ${{ github.workspace }}/internal/nginx/modules/**/*.js | ||
prettier_version: 2.6.2 | ||
- name: Prettier Output | ||
if: ${{ failure() }} | ||
|
@@ -119,9 +119,9 @@ jobs: | |
- name: Setup Node.js Environment | ||
uses: actions/setup-node@v3 | ||
with: | ||
node_version: 18 | ||
node-version: 18 | ||
- run: npm install mocha@^8.2 esm chai | ||
- run: npx mocha -r esm ${{ github.workspace }}/internal/nginx/modules/httpmatches_test.js | ||
- run: npx mocha -r esm ${{ github.workspace }}/internal/nginx/modules/test/httpmatches.test.js | ||
|
||
binary: | ||
name: Build Binary | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -67,10 +67,10 @@ fmt: ## Run go fmt against code. | |
|
||
.PHONY: njs-fmt | ||
njs-fmt: ## Run prettier against the njs httpmatches module. | ||
docker run --rm \ | ||
-v $(PWD)/internal/nginx/modules/:/njs-modules/ \ | ||
docker run --rm -w /modules \ | ||
-v $(PWD)/internal/nginx/modules/:/modules/ \ | ||
node:18 \ | ||
npx [email protected] --write njs-modules/ --config=njs-modules/.prettierrc | ||
/bin/bash -c "npm install && npm run format" | ||
|
||
.PHONY: vet | ||
vet: ## Run go vet against code. | ||
|
@@ -86,10 +86,10 @@ unit-test: ## Run unit tests for the go code | |
go tool cover -html=cover.out -o cover.html | ||
|
||
njs-unit-test: ## Run unit tests for the njs httpmatches module. | ||
docker run --rm -w /src \ | ||
-v $(PWD)/internal/nginx/modules/:/src/njs-modules/ \ | ||
docker run --rm -w /modules \ | ||
-v $(PWD)/internal/nginx/modules:/modules/ \ | ||
node:18 \ | ||
/bin/bash -c "npm install mocha@^8.2 esm chai && npx mocha -r esm njs-modules/httpmatches_test.js" | ||
/bin/bash -c "npm install && npm test && npm run clean" | ||
|
||
.PHONY: dev-all | ||
dev-all: deps fmt njs-fmt vet lint unit-test njs-unit-test |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.