Skip to content
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

feat(platform): allow for configurable API route expose path #319

Merged
merged 1 commit into from
Apr 4, 2023

Conversation

goetzrobin
Copy link
Member

this adds an option called apiBaseUrl that lets users configure the base path on which the api endpoints are exposed.

closes #287

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • Other... Please describe:

Which package are you modifying?

  • vite-angular-plugin
  • astro-angular
  • create-analog
  • router
  • platform
  • content

What is the current behavior?

API prefix is hard coded.

Issue Number: #287

What is the new behavior?

API prefix can be passed in as an option to the Analog vite plugin

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

@netlify
Copy link

netlify bot commented Apr 4, 2023

Deploy Preview for analog-app ready!

Name Link
🔨 Latest commit d3b14d2
🔍 Latest deploy log https://app.netlify.com/sites/analog-app/deploys/642c8954d3089100083f790d
😎 Deploy Preview https://deploy-preview-319--analog-app.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@netlify
Copy link

netlify bot commented Apr 4, 2023

Deploy Preview for analog-docs ready!

Name Link
🔨 Latest commit d3b14d2
🔍 Latest deploy log https://app.netlify.com/sites/analog-docs/deploys/642c89544b24ec0008db0f31
😎 Deploy Preview https://deploy-preview-319--analog-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@netlify
Copy link

netlify bot commented Apr 4, 2023

Deploy Preview for analog-blog ready!

Name Link
🔨 Latest commit d3b14d2
🔍 Latest deploy log https://app.netlify.com/sites/analog-blog/deploys/642c895414d16100083dda35
😎 Deploy Preview https://deploy-preview-319--analog-blog.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@goetzrobin
Copy link
Member Author

@brandonroberts currently for e2e testing I modified the analog-app project. Do you want me to create a completely new application that has this custom API prefix and add e2e tests for that to also ensure that the default /api prefix continues to work?

@brandonroberts
Copy link
Member

@brandonroberts currently for e2e testing I modified the analog-app project. Do you want me to create a completely new application that has this custom API prefix and add e2e tests for that to also ensure that the default /api prefix continues to work?

I'd just keep the /api prefix the same in the analog-app, but set it explicitly in the vite config

apps/docs-app/docs/features/api/overview.md Outdated Show resolved Hide resolved
packages/platform/src/lib/vite-nitro-plugin.ts Outdated Show resolved Hide resolved
packages/platform/src/lib/platform-plugin.ts Outdated Show resolved Hide resolved
packages/platform/src/lib/platform-plugin.ts Outdated Show resolved Hide resolved
this adds an option called apiBaseUrl that lets users configure
the base path on which the api endpoints are exposed.

closes #287
@goetzrobin goetzrobin force-pushed the make-api-endpoint-configurable branch from 97b38da to d3b14d2 Compare April 4, 2023 20:32
@brandonroberts brandonroberts merged commit 26c78a1 into main Apr 4, 2023
@brandonroberts brandonroberts deleted the make-api-endpoint-configurable branch April 4, 2023 20:47
Villanuevand pushed a commit to Villanuevand/analog that referenced this pull request Sep 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature: configurable API route expose path
2 participants