Compare commits

...

10 Commits

Author SHA1 Message Date
Ruslan Zagitov
4d621c8bbe chore: add new dictionary 2024-12-27 23:32:54 +03:00
Ruslan Zagitov
ab8a9ebc99 feat: add '/units' endpoints; add 'put' and 'delete' requests to '/dictionaries' endpoint 2024-12-27 23:15:26 +03:00
qosquo
872c921a53 feat: add kfu-m-24-1 stubs folder; include eng-it-lean stubs api 2024-12-19 19:51:07 +03:00
10b5207f9a Merge pull request 'feat: add fetch masters and add model' (#49) from feature/dry-wash-masters into master
Reviewed-on: #49
Reviewed-by: Primakov Alexandr Alexandrovich <primakovpro@gmail.com>
2024-12-15 20:02:41 +03:00
2ede62bcd8 Merge pull request 'added mock backend for sdk team' (#39) from sergepolin/multy-stub:sdk-team into master
Reviewed-on: #39
Reviewed-by: Primakov Alexandr Alexandrovich <primakovpro@gmail.com>
2024-12-15 19:59:22 +03:00
1788f90cde feat: add fetch masters and add model
All checks were successful
platform/multy-stub/pipeline/head This commit looks good
2024-12-15 17:53:45 +03:00
a37f7ea8a8 Merge pull request 'dhs-testing stubs' (#48) from dhs-testing into master
Reviewed-on: #48
2024-12-14 10:36:37 +03:00
18b63bed21 dhs-testing stubs
All checks were successful
platform/multy-stub/pipeline/head This commit looks good
2024-12-14 10:33:28 +03:00
707c3be3ec Merge pull request 'feat: freetracker dashboard-performer stubs' (#46) from feat/freetracker into master
Reviewed-on: #46
2024-12-13 22:07:47 +03:00
359a136dbf added mock backend for sdk team 2024-10-19 01:32:36 +03:00
22 changed files with 797 additions and 10 deletions

View File

@@ -42,6 +42,7 @@ app.use(require('./root'))
/**
* Добавляйте сюда свои routers.
*/
app.use('/kfu-m-24-1', require('./routers/kfu-m-24-1'))
app.use('/epja-2024-1', require('./routers/epja-2024-1'))
app.use('/todo', require('./routers/todo/routes'))
app.use('/dogsitters-finder', require('./routers/dogsitters-finder'))
@@ -49,6 +50,7 @@ app.use('/kazan-explore', require('./routers/kazan-explore'))
app.use('/edateam', require('./routers/edateam-legacy'))
app.use('/dry-wash', require('./routers/dry-wash'))
app.use('/freetracker', require('./routers/freetracker'))
app.use('/dhs-testing', require('./routers/dhs-testing'))
app.use(require('./error'))

View File

@@ -0,0 +1,37 @@
const router = require('express').Router()
const {MasterModel} = require('./model/master')
router.post('/master', async (req, res,next) => {
const {name, phone} = req.body
if (!name || !phone ){
throw new Error('Enter name and phone')
}
try {
const master = await MasterModel.create({name, phone})
res.status(200).send({success: true, body: master})
} catch (error) {
next(error)
}
})
router.get('/masters', async (req, res,next) => {
try {
const master = await MasterModel.find({})
res.status(200).send({success: true, body: master})
} catch (error) {
next(error)
}
})
router.get('/orders', (req, res) => {
res
.status(200)
.send(require(`./json/arm-orders/success.json`))
})
module.exports = router

View File

@@ -1,15 +1,8 @@
const router = require('express').Router()
const armRouter = require('./arm')
router.get('/arm/masters', (req, res) => {
res
.status(200)
.send(require("./json/arm-masters/success.json"))
})
router.get('/arm/orders', (req, res) => {
res
.status(200)
.send(require(`./json/arm-orders/success.json`))
})
router.use('/arm', armRouter)
module.exports = router

View File

@@ -0,0 +1,20 @@
const { Schema, model } = require('mongoose')
const schema = new Schema({
name: {type: String, required: true},
phone: {type: String, required: true,unique: true,},
created: {
type: Date, default: () => new Date().toISOString(),
},
})
schema.set('toJSON', {
virtuals: true,
versionKey: false,
})
schema.virtual('id').get(function () {
return this._id.toHexString()
})
exports.MasterModel = model('dry-wash-master', schema)

View File

@@ -0,0 +1,30 @@
const { Schema, model } = require('mongoose')
const schema = new Schema({
startWashTime: {type: String, required: true},
endWashTime: {type: String, required: true},
orderDate: {type: String, required: true},
location: {type: String, required: true},
phone: {type: String, required: true},
status: {type: String, required: true},
carNumber: {type: String, required: true},
created: {
type: Date, default: () => new Date().toISOString(),
},
updated: {
type: Date, default: () => new Date().toISOString(),
},
master: {type: Schema.Types.ObjectId, ref: 'dry-wash-master'},
notes: String,
})
schema.set('toJSON', {
virtuals: true,
versionKey: false,
})
schema.virtual('id').get(function () {
return this._id.toHexString()
})
exports.OrderModel = model('dry-wash-order', schema)

View File

@@ -0,0 +1,60 @@
{
"info": {
"_postman_id": "e91fbcf7-3c7b-420d-a49e-4dbb6199c14a",
"name": "dry-wash",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
"_exporter_id": "27705820"
},
"item": [
{
"name": "arm",
"item": [
{
"name": "create master",
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "raw",
"raw": "{\n \"name\":\"Anton\",\n \"phone\": \"89172420577\"\n}",
"options": {
"raw": {
"language": "json"
}
}
},
"url": {
"raw": "{{host}}/arm/master",
"host": [
"{{host}}"
],
"path": [
"arm",
"master"
]
}
},
"response": []
},
{
"name": "get masters",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "{{host}}/arm/masters",
"host": [
"{{host}}"
],
"path": [
"arm",
"masters"
]
}
},
"response": []
}
]
}
]
}

View File

@@ -7,4 +7,6 @@ router.use('/cats', require('./cats/index'))
router.use('/ecliptica', require('./ecliptica/index'))
router.use('/sdk', require('./sdk/index'))
module.exports = router

View File

@@ -0,0 +1,123 @@
const router = require('express').Router();
const { v4: uuidv4 } = require('uuid');
const workout1 = {
id: uuidv4(),
title: "Toned upper body",
exercises: [
{ title: "Push ups", repsOrDuration: 12, isTimeBased: false },
{ title: "Plank", repsOrDuration: 4, isTimeBased: true },
{ title: "Bicep curl", repsOrDuration: 12, isTimeBased: false, weight: 5 },
{ title: "Bicep curl", repsOrDuration: 12, isTimeBased: false, weight: 5 },
{ title: "Bicep curl", repsOrDuration: 12, isTimeBased: false, weight: 5 },
{ title: "Bicep curl", repsOrDuration: 12, isTimeBased: false, weight: 5 },
],
tags: ['Weights', 'Arms', 'Abs', 'Chest', 'Back']
};
const workout2 = {
id: uuidv4(),
title: "Tom Platz's legs",
exercises: [
{ title: "Squats", repsOrDuration: 12, isTimeBased: false, weight: 40 },
{ title: "Leg Press", repsOrDuration: 4, isTimeBased: false, weight: 65 },
{ title: "Lunges", repsOrDuration: 2, isTimeBased: true }
],
tags: ['Weights', 'Legs']
};
const workout3 = {
id: uuidv4(),
title: "HIIT",
exercises: [
{ title: "Jumping rope", repsOrDuration: 100, isTimeBased: false },
{ title: "Burpees", repsOrDuration: 3, isTimeBased: true },
{ title: "Jumping Jacks", repsOrDuration: 50, isTimeBased: false }
],
tags: ['Cardio']
}
const savedWorkouts = [workout1, workout3];
const trainingWorkouts = [workout2];
router.post('/workout', (req, res) => {
const newWorkout = { ...req.body, id: uuidv4() };
savedWorkouts.push(newWorkout);
res.status(201).json(newWorkout);
});
router.get('/workouts', (req, res) => {
res.json(savedWorkouts);
});
router.post('/training/workout', (req, res) => {
const newWorkout = { ...req.body, id: uuidv4() };
trainingWorkouts.push(newWorkout);
res.status(201).json(newWorkout);
});
const trainings = [{ id: uuidv4(), calories: 450, date: new Date("Thu Oct 03 2024 10:05:24 GMT+0300 (Moscow Standard Time)"), emoji: "fuzzy", hours: 1, minutes: 30, isWorkoutSaved: true, workout: workout1.id }];
const days = [
new Date("Thu Oct 03 2024 10:05:24 GMT+0300 (Moscow Standard Time)"),
];
router.post('/training', (req, res) => {
const newTraining = { ...req.body, id: uuidv4() };
trainings.push(newTraining);
days.push(newTraining.date);
res.status(201).json(newTraining);
});
router.get('/training', (req, res) => {
const { date } = req.query;
if (!date) {
return res.status(400).json({ message: 'Date query parameter is required' });
}
const formattedDate = new Date(date);
const result = trainings.find(t => new Date(t.date).toDateString() === formattedDate.toDateString());
if (result) {
res.json(result);
} else {
res.status(404).json({ message: 'Training not found for the specified date' });
}
});
router.get('/training/workout', (req, res) => {
const { id } = req.query;
if (!id) {
return res.status(400).json({ message: 'Id query parameter is required' });
}
const result = trainingWorkouts.find(w => w.id === id);
if (result) {
res.json(result);
} else {
res.status(404).json({ message: 'Training with such workout not found' });
}
});
router.get('/workout', (req, res) => {
const { id } = req.query;
if (!id) {
return res.status(400).json({ message: 'Id query parameter is required' });
}
const result = savedWorkouts.find(w => w.id === id);
if (result) {
res.json(result);
} else {
res.status(404).json({ message: 'Workout not found' });
}
});
router.get('/trainings', (req, res) => {
res.json(trainings);
});
router.get('/days', (req, res) => {
res.json(days);
})
module.exports = router;

View File

@@ -0,0 +1,17 @@
[
{
"id": 0,
"description": "10 часто используемых",
"imageFilename": "kart1.jpg"
},
{
"id": 1,
"description": "10 слов в Data Science",
"imageFilename": "kart1.jpg"
},
{
"id": 2,
"description": "IT Basics Dictionary",
"imageFilename": "kart1.jpg"
}
]

View File

@@ -0,0 +1,275 @@
[
{
"id": 0,
"words": [
{
"id": 0,
"word": "Tech",
"definition": "short for technical, relating to the knowledge, machines, or methods used in science and industry. Tech is a whole industry, which includes IT",
"examples": [
"“As a DevOps engineer I have been working in Tech since 2020.”"
],
"synonyms": ["IT"]
},
{
"id": 1,
"word": "career path",
"definition": "the series of jobs or roles that constitute a person's career, especially one in a particular field",
"examples": [
"“Technology is an evolving field with a variety of available career paths.”"
],
"synonyms": []
}
]
},
{
"id": 1,
"words": [
{
"id": 0,
"word": "Machine Learning",
"translation": "Машинное обучение",
"definition": "An approach to artificial intelligence where computers learn from data without being explicitly programmed.",
"synonyms": ["Trainable Algorithms", "Automated Learning"],
"examples": [
"We used machine learning techniques to forecast product demand.",
"The movie recommendation system is based on machine learning algorithms.",
"Machine learning helped improve the accuracy of speech recognition in our application."
]
},
{
"id": 1,
"word": "Neural Network",
"translation": "Нейронная сеть",
"definition": "A mathematical model inspired by the structure and function of biological neural networks, consisting of interconnected nodes organized in layers that can process information.",
"synonyms": ["Artificial Neural Network", "Deep Neural Network"],
"examples": [
"To process large amounts of data, we created a deep learning neural network.",
"This neural network is capable of generating realistic images.",
"Using neural networks significantly improved the quality of text translation."
]
},
{
"id": 2,
"word": "Algorithm",
"translation": "Алгоритм",
"definition": "A step-by-step procedure or set of instructions for solving a problem or performing a computation.",
"synonyms": ["Procedure", "Method"],
"examples": [
"The algorithm we developed quickly finds the optimal delivery route.",
"This algorithm sorts an array with a minimal number of operations.",
"Encryption algorithms ensure secure transmission of data over the internet."
]
},
{
"id": 3,
"word": "Data Model",
"translation": "Модель данных",
"definition": "An abstract representation of the structure of data, describing how data is organized and related to each other.",
"synonyms": ["Data Structure", "Schema"],
"examples": [
"Our data model allows us to efficiently manage relationships between customers and orders.",
"The data model was designed considering scalability and performance requirements.",
"This data model is used for storing information about social network users."
]
},
{
"id": 4,
"word": "Regression",
"translation": "Регрессия",
"definition": "A statistical method used to determine the relationship between one variable and others.",
"synonyms": ["Linear Regression", "Nonlinear Regression"],
"examples": [
"We applied linear regression to analyze the impact of advertising campaigns on sales.",
"Results from the regression analysis showed a strong correlation between customer age and purchase frequency.",
"Regression helped us assess how changes in environmental conditions affect crop yield."
]
},
{
"id": 5,
"word": "Clustering",
"translation": "Кластеризация",
"definition": "The process of grouping similar objects into clusters so that objects within the same cluster are more similar to each other than to those in other clusters.",
"synonyms": ["Grouping", "Segmentation"],
"examples": [
"Clustering allowed us to divide customers into several groups according to their purchasing behavior.",
"Clustering methods are used to automatically group news by topic.",
"As a result of clustering, several market segments were identified, each with its own characteristics."
]
},
{
"id": 6,
"word": "Supervised Learning",
"translation": "Обучение с учителем",
"definition": "A type of machine learning where the algorithm learns from labeled data, meaning data for which correct answers are known.",
"synonyms": ["Controlled Learning", "Labeled Classification"],
"examples": [
"Supervised learning is used to classify emails as spam or not-spam.",
"This approach was used to create a model that predicts real estate prices based on multiple parameters.",
"Supervised learning helps diagnose diseases at early stages through medical data analysis."
]
},
{
"id": 7,
"word": "Data Labeling",
"translation": "Разметка данных",
"definition": "The process of assigning labels or classes to data so it can be used in supervised learning.",
"synonyms": ["Data Annotation", "Tagging"],
"examples": [
"Before starting model training, we labeled the data by assigning each photo an animal category.",
"Data labeling includes marking user reviews as positive or negative.",
"Text documents were labeled with special tags for subsequent analysis."
]
},
{
"id": 8,
"word": "Hyperparameters",
"translation": "Гиперпараметры",
"definition": "Parameters that define the structure and behavior of a machine learning model, set before the learning process begins.",
"synonyms": ["Model Settings", "Configuration Parameters"],
"examples": [
"Optimizing hyperparameters enabled us to enhance the performance of our machine learning model.",
"Hyperparameters include settings such as the number of layers in a neural network and the learning rate.",
"Choosing the right hyperparameters is crucial for achieving high model accuracy."
]
},
{
"id": 9,
"word": "Model Validation",
"translation": "Валидация модели",
"definition": "The process of evaluating the quality of a model by testing it on new, previously unseen data.",
"synonyms": ["Model Testing", "Model Verification"],
"examples": [
"After completing the training, we validated the model using a test dataset.",
"During model validation, its ability to make accurate predictions on new data is checked.",
"Validation showed that the model is robust against changes in data and has low generalization error."
]
}
]
},
{
"id": 2,
"words": [
{
"id": 0,
"word": "software",
"translation": "программное обеспечение",
"definition": "A collection of computer instructions that perform a specific task, typically for use by humans or machines.",
"synonyms": ["код", "приложение", "управление программами"],
"examples":
[
"I need to update the software on my new laptop.",
"The company uses Windows as its operating system."
]
},
{
"id": 1,
"word": "hardware",
"translation": "железо",
"definition": "Physical components of a computer that process information, including processors and storage devices.",
"synonyms": ["equipment", "приборы", "оборудование"],
"examples":
[
"The keyboard is part of the hardware on this device.",
"They upgraded their router to improve internet speed."
]
},
{
"id": 2,
"word": "network",
"translation": "сети",
"definition": "A system of interconnected devices that communicate with each other through data transmission over a networked medium.",
"synonyms": ["трансляция", "коммуникации", "диалог"],
"examples":
[
"We use the internet to connect our devices in the same area.",
"The company relies on their internal network for data sharing."
]
},
{
"id": 3,
"word": "algorithm",
"translation": "алгоритм",
"definition": "A set of instructions that a computer follows to solve a problem or achieve a specific task.",
"synonyms": ["процесс", "схема", "текст"],
"examples":
[
"The algorithm for sorting numbers is easy to follow.",
"The new software includes an advanced algorithm."
]
},
{
"id": 4,
"word": "encryption",
"translation": "криптография",
"definition": "A technique that transforms information into a secure form, making it unreadable without the appropriate key.",
"synonyms": ["шифрование", "окрышение", "опциональное"],
"examples":
[
"Our data is encrypted to ensure its privacy and security.",
"I need to use an encryption program for my important documents."
]
},
{
"id": 5,
"word": "debugging",
"translation": "поиск и исправление ошибок",
"definition": "The process of identifying and correcting errors or defects in a computer program.",
"synonyms": ["исправление", "сканирование", "анализ"],
"examples":
[
"I need to debug the code for this new project.",
"We use automated tools to find bugs."
]
},
{
"id": 6,
"word": "API",
"translation": "интерфейс приложения",
"definition": "A set of rules and protocols that enables communication between software applications, typically over a network.",
"synonyms": ["серверное программирование", "функциональная структура"],
"examples":
[
"We use the API for our mobile app to access data from the backend server.",
"I need to write an API for connecting my devices to the internet."
]
},
{
"id": 7,
"word": "virtual",
"translation": "виртуальный",
"definition": "A representation of a thing that does not exist physically but exists in digital form.",
"synonyms": ["высокопроизводительный", "представление", "цифровой"],
"examples":
[
"I use virtual reality to experience different environments.",
"Our company offers virtual office spaces for remote work."
]
},
{
"id": 8,
"word": "infrastructure",
"translation": "инфраструктура",
"definition": "The underlying systems and equipment of a computer network or organization, including hardware, software, and physical connections.",
"synonyms": ["оборудование", "устройство", "системы"],
"examples":
[
"Our IT infrastructure is robust to ensure reliable operations.",
"They need to improve their internet infrastructure for better connectivity."
]
},
{
"id": 9,
"word": "hacker",
"translation": "хакер",
"definition": "A skilled individual who uses computer technology to break into and misuse a system or network.",
"synonyms": ["дезориентированный", "манипулятор", "прокурор"],
"examples":
[
"I need to avoid getting involved with hackers.",
"They were caught hacking into the company's confidential database."
]
}
]
}
]

View File

@@ -0,0 +1,76 @@
const fs = require('fs');
const path = require('path');
const router = require("express").Router();
module.exports = router;
const data = require("./data/dictionaries.json");
const wordsData = require("./data/dictionaryWords.json");
router.get("/", (req, res) => {
res.send(data);
});
// Put new dictionary to the array of dictionaries
router.put('/new', (req, res) => {
if (!data || !Array.isArray(data)) {
return res.status(400).send('No array of dictionaries found`');
}
const updatedData = req.body;
if (!updatedData) {
return res.status(400).send('No data to update'); // Bad request
}
if (!data) {
return res.status(500).send('No data to update'); // Internal server error
}
indexedUpdatedData = { id: data.length, ...updatedData }; // Add the new dictionary to the array
data.push(indexedUpdatedData); // Add the new dictionary to the array
fs.writeFile(path.join(__dirname, 'data/dictionaries.json'), JSON.stringify(data), (err) => {
if (err) {
console.error(err); // Log the error
return res.status(500).send('Error saving data');
}
res.status(200).json(data); // Send back the updated data
});
});
router.delete('/:id', (req, res) => {
const id = parseInt(req.params.id); // Get the dictionary id from the URL
if (!id || isNaN(id)) {
return res.status(400).send('Invalid ID'); // Bad request
}
const index = data.findIndex((dictionary) => dictionary.id === id);
if (index < 0) {
return res.status(404).send('Not found'); // Not found
}
data.splice(index, 1); // Remove the dictionary from the array
fs.writeFile(path.join(__dirname, 'data/dictionaries.json'), JSON.stringify(data), (err) => {
if (err) {
console.error(err); // Log the error
return res.status(500).send('Error saving data');
}
res.send({ message: `Dictionary with id ${id} deleted` });
});
});
router.get("/:id", (req, res) => {
const id = parseInt(req.params.id);
const words = wordsData.find((word) => word.id === id);
if (!words) {
return res.status(404).send("Not found");
}
res.send(words);
});

View File

@@ -0,0 +1,15 @@
const router = require("express").Router();
const dictionariesRouter = require("./dictionaries");
const unitsRouter = require('./units');
module.exports = router;
const delay =
(ms = 250) =>
(req, res, next) => {
setTimeout(next, ms);
};
router.use(delay());
router.use("/dictionaries", dictionariesRouter);
router.use('/units', unitsRouter);

View File

@@ -0,0 +1,71 @@
# Unit 1. Multifunctional Verbs: Be, Have, and Do
## Overview
This unit focuses on the use of multifunctional verbs in English. These verbs are able to express multiple meanings depending on their use in a sentence.
## Learning Objectives
By the end of this unit, you will be able to:
- Identify the different forms of the main multifunctional verb.
- Explain how these forms can be used interchangeably in sentences.
- Demonstrate the correct usage of the three forms of the multifunctional verb by providing sentences and examples.
## Vocabulary Review
| Term | Definition |
| ---- | -------------------------------------------------------- |
| Be | To express a present or ongoing state of being. |
| Have | To express ownership or possession. |
| Do | To express an action to be done, future action or habit. |
## Activities
### Activity 1: Identify the Different Forms of the Main Multifunctional Verb
- Read through each sentence and identify if the verb is used in its present tense (is), past tense (was/were), or future tense (will, would).
- Discuss how this usage can vary depending on context.
- Write down sentences that use different forms to illustrate your points.
1. **Sentence 1**: "The cat is sleeping."
- Present tense: The cat is sleeping.
- Past tense: The cat slept.
- Future tense: The cat will sleep.
2. **Sentence 2**: "I have a dog at home."
- Present tense: I have a dog.
- Past tense: I had a dog.
- Future tense: I will have a dog.
3. **Sentence 3**: "We are going on a hike tomorrow."
- Present tense: We are going on a hike.
- Past tense: We went on a hike.
- Future tense: We will go on a hike.
4. **Sentence 4**: "He has been studying all day."
- Present tense: He is studying.
- Past tense: He studied.
- Future tense: He will study.
5. **Sentence 5**: "We are going to buy some groceries later today."
- Present tense: We are going to buy some groceries.
- Past tense: We bought some groceries.
- Future tense: We will buy some groceries.
### Activity 2: Explain How These Forms Can Be Used Interchangeably in Sentences
- Read through a sentence and identify the present, past, and future tense uses.
- In pairs, explain why these forms are used interchangeably.
- Provide examples of sentences that demonstrate this usage.
- Highlight how the context changes the meaning.
### Activity 3: Correct Usage of the Three Forms of the Multifunctional Verb
- Read through a sentence and identify which form is being used.
- In pairs, discuss why these forms are used in certain situations.
- Provide sentences that demonstrate the correct usage of the three forms.

View File

@@ -0,0 +1 @@
[{"id":0,"filename":"unit-1","name":"Unit 1: Multifunctional Verbs: Be, Have, and Do"}]

View File

@@ -0,0 +1,58 @@
const fs = require('fs');
const path = require('path');
const router = require('express').Router();
module.exports = router;
const data = require('./data/units.json');
router.get('/', (req, res) => {
res.send(data);
});
router.put('/', (req, res) => {
const newUnit = req.body
if (!newUnit) {
return res.status(400).send('No new unit to be added')
}
if (!data) {
return res.status(500).send('No data to be updated')
}
data.push({ "id": data.length, ...newUnit })
fs.writeFileSync(path.join(__dirname, 'data', 'units.json'), JSON.stringify(data));
res.status(200).send(data);
});
router.delete('/:id', (req, res) => {
const id = parseInt(req.params.id);
const index = data.findIndex((unit) => unit.id === id);
if (index < 0) {
return res.status(404).send('Not found');
}
data.splice(index, 1);
fs.writeFileSync(path.join(__dirname, 'data', 'units.json'), JSON.stringify(data));
res.send({ message: `Unit with ID ${id} deleted` });
});
router.get('/:id', (req, res) => {
const id = parseInt(req.params.id);
const unit = data.find((unit) => unit.id === id);
if (!unit) {
return res.status(404).send('Not found');
}
const unitFilepath = path.join(__dirname, 'data', `${unit.filename}.md`);
const unitContent = fs.readFileSync(unitFilepath, 'utf-8');
if (!unitContent) {
return res.status(404).send('Not found');
}
res.send({ ...unit, content: unitContent });
});

View File

@@ -0,0 +1,7 @@
const { Router } = require('express')
const router = Router()
router.use('/eng-it-lean', require('./eng-it-lean/index'))
module.exports = router