check request
This commit is contained in:
parent
8fbd3592e2
commit
d4ef738160
@ -17,6 +17,7 @@ module.exports = {
|
|||||||
},
|
},
|
||||||
config: {
|
config: {
|
||||||
"journal.socket.url": "ws://localhost",
|
"journal.socket.url": "ws://localhost",
|
||||||
"journal.socket.path": "/socket.io/"
|
"journal.socket.path": "/socket.io/",
|
||||||
|
"journal.back.url": "/api",
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -15,6 +15,7 @@ import {
|
|||||||
|
|
||||||
import arrow from '../assets/36-arrow-right.svg';
|
import arrow from '../assets/36-arrow-right.svg';
|
||||||
import { connect, getSocket } from "../socket";
|
import { connect, getSocket } from "../socket";
|
||||||
|
import { getConfigValue } from '@ijl/cli';
|
||||||
|
|
||||||
export const Journal = () => {
|
export const Journal = () => {
|
||||||
const [lessons, setLessons] = useState(null);
|
const [lessons, setLessons] = useState(null);
|
||||||
@ -25,6 +26,8 @@ export const Journal = () => {
|
|||||||
socket.on('lessons', data => {
|
socket.on('lessons', data => {
|
||||||
setLessons(data)
|
setLessons(data)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
fetch(`${getConfigValue('journal.back.url')}/check`)
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
const [value, setValue] = useState('');
|
const [value, setValue] = useState('');
|
||||||
|
@ -1,3 +1,7 @@
|
|||||||
const router = require('express').Router();
|
const router = require('express').Router();
|
||||||
|
|
||||||
|
router.get('/check', function (req, res){
|
||||||
|
res.send({ ok: true })
|
||||||
|
})
|
||||||
|
|
||||||
module.exports = router;
|
module.exports = router;
|
||||||
|
Loading…
Reference in New Issue
Block a user