Skip to content

Commit

Permalink
4. Initialize Express backend
Browse files Browse the repository at this point in the history
  • Loading branch information
wishyoudie committed Aug 5, 2024
1 parent 4e2d45a commit 2173bd9
Show file tree
Hide file tree
Showing 3 changed files with 870 additions and 0 deletions.
11 changes: 11 additions & 0 deletions backend/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
const express = require("express");
const { Bot } = require("grammy");

const bot = new Bot("TOPSECRET:TOKEN");
const app = express();

app.use(express.json());

app.listen(3000, () => {
console.log("Server is running on port 3000");
});
20 changes: 20 additions & 0 deletions backend/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"name": "backend",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"start": "node index.js"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"express": "^4.19.2",
"grammy": "^1.28.0",
"http-proxy-middleware": "^3.0.0"
},
"devDependencies": {
"@types/express": "^4.17.21"
}
}
Loading

0 comments on commit 2173bd9

Please sign in to comment.