Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
les
gancio
Commits
3aaad91e
Commit
3aaad91e
authored
Jul 29, 2019
by
les
Browse files
add nodeinfo
https://git.feneas.org/jaywink/nodeinfo2
http://nodeinfo.diaspora.software/
parent
c9780ad5
Changes
2
Hide whitespace changes
Inline
Side-by-side
server/federation/nodeinfo.js
0 → 100644
View file @
3aaad91e
const
express
=
require
(
'
express
'
)
const
router
=
express
.
Router
()
const
{
user
:
User
}
=
require
(
'
../api/models
'
)
const
settingsController
=
require
(
'
../api/controllers/settings
'
)
const
config
=
require
(
'
config
'
)
const
version
=
require
(
'
../../package.json
'
).
version
router
.
get
(
'
/
'
,
async
(
req
,
res
)
=>
{
const
ret
=
{
version
:
'
1.0
'
,
server
:
{
baseUrl
:
config
.
baseurl
,
name
:
config
.
title
,
software
:
'
Gancio
'
,
version
},
protocols
:
[
'
activitypub
'
],
openRegistrations
:
settingsControllers
.
settings
.
allow_registration
,
usage
:{
users
:
{
total
:
10
}
},
localPost
:
3
,
localComments
:
0
})
module
.
exports
=
router
server/index.js
View file @
3aaad91e
...
...
@@ -32,6 +32,7 @@ async function start() {
app
.
use
(
'
/api
'
,
require
(
'
./api/index
'
))
app
.
use
(
'
/.well-known/webfinger
'
,
cors
(),
require
(
'
./federation/webfinger
'
))
app
.
use
(
'
/.well-known/x-nodeinfo2
'
,
cors
(),
require
(
'
./federation/nodeinfo
'
))
app
.
use
(
'
/federation
'
,
cors
(),
require
(
'
./federation
'
))
// Give nuxt middleware to express
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment