Extract TaM simulation from front and TaM data from back

This commit is contained in:
Mattéo Delabre 2020-07-19 22:13:26 +02:00
parent 0d7b384821
commit 476a0787a1
Signed by: matteo
GPG Key ID: AE3FBD02DC583ABB
15 changed files with 9 additions and 9 deletions

View File

@ -4,8 +4,8 @@
"description": "",
"main": "index.js",
"scripts": {
"back": "node back",
"front": "parcel serve front/index.html",
"back": "node src/back",
"front": "parcel serve src/front/index.html",
"lint": "eslint ."
},
"keywords": [],

View File

@ -1,6 +1,6 @@
#!/usr/bin/env node
const network = require('../back/data/network');
const network = require('../src/tam/network');
const path = require('path');
const fs = require('fs');
@ -10,7 +10,7 @@ const fs = require('fs');
const data = await network.fetch(lines);
fs.writeFileSync(
path.join(__dirname, '../back/data/network.json'),
path.join(__dirname, '../src/tam/network.json'),
JSON.stringify(
data,
(_, value) =>

View File

@ -1,7 +1,7 @@
const express = require('express');
const util = require('./util');
const realtime = require('./data/realtime');
const util = require('../util');
const realtime = require('../tam/realtime');
const app = express();
const port = 4321;

View File

@ -2,6 +2,6 @@ require('regenerator-runtime/runtime');
const {createMap} = require('./map');
require('./data');
require('../tam/simulation');
createMap(/* map = */ 'map');

View File

@ -21,7 +21,7 @@ const color = require('color');
const mapboxToken = `pk.eyJ1IjoibWF0dGVvZGVsYWJyZSIsImEiOiJja2NxaTUyMmUwcmFhMn\
h0NmFsdzQ3emxqIn0.cyxF0h36emIMTk3cc4VqUw`;
const network = require('../back/data/network.json');
const network = require('../tam/network.json');
const makeDataSources = async () =>
{

View File

@ -1,5 +1,5 @@
const axios = require('axios');
const network = require('../back/data/network.json');
const network = require('./network.json');
const server = 'http://localhost:4321';