13 lines
234 B
JavaScript
13 lines
234 B
JavaScript
|
import express from 'express'
|
||
|
import gun from 'gun'
|
||
|
|
||
|
const app = express()
|
||
|
const port = 8000
|
||
|
app.use(gun.serve)
|
||
|
|
||
|
const server = app.listen(port, () => {
|
||
|
console.log("Listening at: http://localhost:" + port)
|
||
|
})
|
||
|
|
||
|
gun({web: server})
|