UNPKG
cra-template-node-express
Version:
latest (0.6.8)
0.6.8
0.6.6
0.6.4
0.6.0
0.4.9
0.4.8
0.4.6
0.2.2
0.2.0
0.1.0
You can use the template using the below command.
cra-template-node-express
/
template
/
src
/
server
/
routes
/
index.js
11 lines
(7 loc)
•
197 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
const
{
Router
} =
require
(
'express'
);
const
router =
Router
(); router.
get
(
'/foo'
,
(
req, res
) =>
res.
send
(
'Hello world!'
));
module
.
exports
= router;
if
(
module
.
hot
) {
module
.
hot
.
accept
(); }