adding
This commit is contained in:
@ -33,6 +33,10 @@ const validateApiKey = (req, res, next) => {
|
|||||||
next(); // Proceed if the API key is valid
|
next(); // Proceed if the API key is valid
|
||||||
};
|
};
|
||||||
|
|
||||||
|
app.get("/", (req, res) => {
|
||||||
|
res.send("Hello from the backend server!");
|
||||||
|
}
|
||||||
|
|
||||||
// Forward request to localhost:11434 (ollama)
|
// Forward request to localhost:11434 (ollama)
|
||||||
|
|
||||||
app.post("/api/generate/api/chat", validateApiKey, async (req, res) => {
|
app.post("/api/generate/api/chat", validateApiKey, async (req, res) => {
|
||||||
|
Reference in New Issue
Block a user