From 52e38809212133ef673d11bfa96ba3bb43c3644c Mon Sep 17 00:00:00 2001 From: mat <27899617+mat-1@users.noreply.github.com> Date: Sat, 13 Feb 2021 14:13:42 -0600 Subject: move stuff into src folder --- index.ts | 27 --------------------------- 1 file changed, 27 deletions(-) delete mode 100644 index.ts (limited to 'index.ts') diff --git a/index.ts b/index.ts deleted file mode 100644 index af5095b..0000000 --- a/index.ts +++ /dev/null @@ -1,27 +0,0 @@ -import express from 'express' -import { fetchMemberProfile, fetchUser } from './hypixel' -import { fetchProfile } from './hypixelCached' - -const app = express() - - -app.get('/', async(req, res) => { - res.json({ ok: true }) -}) - -app.get('/player/:user', async(req, res) => { - res.json( - await fetchUser( - { user: req.params.user }, - ['profiles', 'player'] - ) - ) -}) - -app.get('/player/:user/:profile', async(req, res) => { - res.json( - await fetchMemberProfile(req.params.user, req.params.profile) - ) -}) - -app.listen(8080, () => console.log('App started :)')) \ No newline at end of file -- cgit