Download pool/shard001/JavaScript/0006052_app.js from Variable-role/sajaniemi_variable_dataset_large: direct link, hf CLI and curl.
- Browser
- Download file 560 Bytes
-
https://huggingface.co/datasets/Variable-role/sajaniemi_variable_dataset_large/resolve/main/pool/shard001/JavaScript/0006052_app.js
- Command line
-
hf download hf://datasets/Variable-role/sajaniemi_variable_dataset_large/pool/shard001/JavaScript/0006052_app.js
-
curl -L -o 0006052_app.js https://huggingface.co/datasets/Variable-role/sajaniemi_variable_dataset_large/resolve/main/pool/shard001/JavaScript/0006052_app.js
560 Bytes
| const express = require('express'); | |
| const bodyParser = require('body-parser'); | |
| const app = express(); | |
| const PORT = '' || 3000; | |
| const router = require('./router/router.js'); | |
| const dirRouter = require('./router/dir-router.js'); | |
| // 设置静态资源路径 | |
| app.use('/public',express.static('./public')); | |
| // 设置 模板引擎为ejs | |
| app.set('view engine','ejs'); | |
| app.use('/home',router); | |
| app.use('/dir',dirRouter); | |
| app.use((err,req,res,next) => { | |
| res.render('404'); | |
| next(); | |
| }); | |
| app.listen(PORT,() => { | |
| console.log('listening port : ' + PORT); | |
| }); |