Skip to content

Can I run this as a website in the control panel? #2524

Answered by Zo-Bro-23
Shandeika asked this question in Q&A
Discussion options

You must be logged in to vote

You have to use express. Please try the following steps:

  • Create a file called express.js in the root folder
  • Add the following code:
import statsCard from './api/index.js'
import repoCard from './api/pin.js'
import langCard from './api/top-langs.js'
import wakatimeCard from './api/wakatime.js'
import * as express from 'express'

const app = express()
app.listen(YOUR_PORT)

app.get('/', statsCard)
app.get('/pin', repoCard)
app.get('/top-langs', langCard)
app.get('/wakatime', wakatimeCard)
  • Run npm i express
  • Run node express.js to start the server

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@Zo-Bro-23
Comment options

@Zo-Bro-23
Comment options

@Shandeika
Comment options

@Zo-Bro-23
Comment options

@Zo-Bro-23
Comment options

Answer selected by Zo-Bro-23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants