Reputation: 31
import express=require("express");
import bodyParser =require("body-parser");
import cors =require ("cors");
import {connectDb} from "./db";
import routes from "./routes/index";
const app = express();
import functions=require("firebase-functions");
app.get("/some-data", (request:Request, response:any)=>{
response.send("server");
});
exports.api = functions.https.onRequest(app);
app.use(bodyParser.urlencoded());
app.use(bodyParser.json());
app.use(cors());
app.use(routes);
connectDb();
app.listen(3001, () => console.log("Listening on http://localhost:3001"));
I'm trying to acces to the project url and it display cannot get error with 404
Upvotes: 1
Views: 68