add environment variable for changes lang

This commit is contained in:
cany748 2022-06-20 20:09:17 +07:00
parent f8c414042a
commit 2c29909ef6
6 changed files with 25 additions and 31 deletions

View file

@ -14,6 +14,7 @@ const {
PORT,
RELEASE,
PASSWORD,
LANG,
} = require('../config');
module.exports = class Server {
@ -134,6 +135,9 @@ module.exports = class Server {
const { address } = req.body;
return WireGuard.updateClientAddress({ clientId, address });
}))
.get('/api/lang', (Util.promisify(async () => {
return LANG;
})))
.listen(PORT, () => {
debug(`Listening on http://0.0.0.0:${PORT}`);