(WIP) Add initial API client
This commit is contained in:
parent
967f9fc474
commit
faddda83f0
9 changed files with 260 additions and 27 deletions
16
scripts/testing-server.mjs
Normal file
16
scripts/testing-server.mjs
Normal file
|
@ -0,0 +1,16 @@
|
|||
import {IpldStore} from '@adx/common'
|
||||
import server from '@adx/server/dist/server.js'
|
||||
import Database from '@adx/server/dist/db/index.js'
|
||||
|
||||
const PORT = 1986
|
||||
|
||||
async function start() {
|
||||
console.log('Initializing...')
|
||||
|
||||
const db = Database.memory()
|
||||
const serverBlockstore = IpldStore.createInMemory()
|
||||
await db.dropTables()
|
||||
await db.createTables()
|
||||
server(serverBlockstore, db, PORT)
|
||||
}
|
||||
start()
|
Loading…
Add table
Add a link
Reference in a new issue