firebase / firebase/apphosting-adapters

HOSTING: Express.js / custom not an option in CLI

Open
#57 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
478
Forks
1.5k
Avg merge
3d 22h
Merged PRs (30d)
2

Description

Hi all. Super excited about the different Web Frameworks integration. My ultimate goal is to get an Astro SSR application up and running. In the past, to get something running with Sapper, there were a bunch of steps so I'm happy to see this happening.

First, I tried with an Astro SSR Node (middleware / Express) [project](https://docs.astro.build/en/guides/integrations-guide/node/). After messing around, I was able to deploy successfully, but it seems like the files are "hosted" (I can go directly to them in the browser), but are not "served" (site just shows Firebase "Page Not Found").

Decided to take a step back and try a basic Express app (from [Stackblitz](https://stackblitz.com/fork/express-simple)).

Following the steps in the [documentation](https://firebase.google.com/docs/hosting/express) and [GitHub repo](https://github.com/FirebaseExtended/firebase-framework-tools#integrate-other-frameworks-with-expressjs), it says that I should see **Express.js / custom** as an option when initializing hosting. I didn't for either projects.

Here's a screenshot:
![image](https://user-images.githubusercontent.com/212875/208971991-7762c652-de94-4586-a41a-7373710c0803.png)

Here's what I'm using:
Firebase CLI version: 11.19.0
Chromebook with Debian GNU/Linux 11 (bullseye)

Further info, for the Astro project, I was able to get it to recognize it as an Express app, by making the hosting.source in firebase.json ".":
`{
"hosting": {
"source": "."
}
}`
like the GitHub repo says and not like:
`{
"hosting": {
"source": "./path-to-your-express-directory",
}
}`
that the documentation stated.

Any insight is greatly appreciated.
Thanks.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.