#Hostingに対してカスタムドメインを設定
#firebase.json の hosting の rewrite に functions を追加
*Functions
<pre>
import * as functions from 'firebase-functions';
import * as express from 'express';
const app: express.Express = express();
router.get('/api/test', (req, res) => {
res.send('TEST!');
});
export const apiService = functions.https.onRequest(app);
</pre>
*firebase.json
<pre>
"hosting": [
: 省略
"rewrites": [
{ "source": "/api/**", "function": "apiapiService"
},
{
"destination": "/index.html"
}
]
}
]
</pre>