VueJS lekcja 1
This commit is contained in:
1 parent
11eb98f6b7
commit
e66b5ebc22
602 files changed
+63992
No files matched your search
@@ -0,0 +1,23 @@
|
||||
const fs = require('fs');
|
||||
const directory_name = 'lekcja-1-directives';
|
||||
|
||||
const data = {
|
||||
folders: [directory_name],
|
||||
lessons: fs.readdirSync(__dirname + "/static/cwiczenia/" + directory_name)
|
||||
};
|
||||
|
||||
const express = require('express');
|
||||
const app = express();
|
||||
const path = require('path');
|
||||
const PORT = 3000;
|
||||
|
||||
app.get('/page_list', function (req, res) {
|
||||
res.send(data);
|
||||
});
|
||||
|
||||
app.use(express.static('static/css'))
|
||||
app.use(express.static('static/cwiczenia/' + directory_name))
|
||||
|
||||
app.listen(PORT, function () {
|
||||
console.log(`Start serwera, port: ${PORT}`);
|
||||
});
|
||||
Reference in new issue
Block a user