Update docker files to build from the folder above to include the proto files.

This commit is contained in:
iamBadgers
2025-06-07 23:30:26 -07:00
parent a2a51754f7
commit a3ecb70abe
8 changed files with 914 additions and 353 deletions

View File

@@ -1,12 +1,26 @@
import express from 'express'
// import express from 'express'
import * as grpc from '@grpc/grpc-js'
const app = express()
// import { Character } from './proto/character'
import { initCharacterService } from './character_service'
const port = 8000;
app.get('/api/person', async (req, res) => {
res.status(200).send('potato!')
const app = new grpc.Server()
initCharacterService(app)
app.bindAsync("0.0.0.0:8000", grpc.ServerCredentials.createInsecure(), () => {
console.log("Starting server at 0.0.0.0:8000")
})
app.listen(8080, async () => {
console.log('starting on 8080')
})
// const app = express()
// app.get('/api/person', async (req, res) => {
// res.status(200).send('potato!')
// })
// app.listen(port, async () => {
// console.log(`Express is listening at http://localhost:${port}`)
// return
// })