package uk.co.rossbinden.transferencevoid.controller

import com.badlogic.gdx.Gdx
import com.badlogic.gdx.net.HttpStatus.SC_OK
import javax.servlet.http.HttpServlet
import javax.servlet.http.HttpServletRequest
import javax.servlet.http.HttpServletResponse

class ControllerJsServlet: HttpServlet() {

    override fun doGet(req: HttpServletRequest, resp: HttpServletResponse) {
        resp.status = SC_OK
        resp.contentType = "application/javascript"
        resp.writer.write(Gdx.files.internal("js/${req.pathInfo}").readString())
    }

}