mirror of
https://github.com/Aviortheking/codestats-readme.git
synced 2025-04-22 10:42:08 +00:00
This PR remove the need to use Vercel to setup the server, currently it can still be used as such using the api folder
20 lines
408 B
TypeScript
20 lines
408 B
TypeScript
import express from 'express'
|
|
import api from './api'
|
|
import history from './api/history'
|
|
import topLangs from './api/top-langs'
|
|
|
|
const app = express()
|
|
|
|
|
|
app.use('/api', api)
|
|
app.use('/api/history', history)
|
|
app.use('/api/top-langs', topLangs)
|
|
|
|
app.get('/', (_, res) => {
|
|
res.redirect(301, 'https://github.com/aviortheking/codestats-readme')
|
|
})
|
|
|
|
app.listen(3000, () => {
|
|
console.log('server launched!')
|
|
})
|