Skip to content

Commit

Permalink
docs: express
Browse files Browse the repository at this point in the history
  • Loading branch information
tpluscode committed Aug 21, 2024
1 parent 88f59ac commit 898c901
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions docs/apis/kopflos/how-to/web-server-libraries.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Integrate with web server libraries

All libraries integrated with Kopflos require the same configuration, at the very least the SPARQL endpoint URL and the API graph URL(s).

## Express

```ts
import express from 'express'
import kopflos from '@kopflos-cms/express'

const app = express()

app.use(kopflos({
sparql: {
default: 'http://localhost:3030/ds/query',
},
apiGraphs: [
'https://example.com/api',
]
}))

app.listen(3000, () => {
console.log('Server is running on http://localhost:3000')
})
```

0 comments on commit 898c901

Please sign in to comment.