我想用NextJS與火力點雲功能,我創建一個雲功能:NextJS與火力地堡雲功能
import * as functions from 'firebase-functions';
import cors from 'cors';
import express from 'express';
import next from 'next';
const nextApp = next({ dev: false });
const handle = nextApp.getRequestHandler();
nextApp
.prepare()
.then(() => {
const server = express();
server.use(cors({ origin: true }));
server.get('/a', (req, res) => {
return nextApp.render(req, res, '/b', req.query);
});
server.get('/b', (req, res) => {
return nextApp.render(req, res, '/a', req.query);
});
server.get('*', (req, res) => {
return handle(req, res);
});
})
.catch(ex => {
console.error(ex.stack);
process.exit(1);
});
export let app = functions.https.onRequest(nextApp);
NextJS創建一個文件夾,我的JS應用程序的構建。
問題是我無法在雲端上傳NextJS構建文件夾。 如何包含此文件夾?
GitHub的問題=>https://github.com/zeit/next.js/issues/2017