Extract TaM simulation from front and TaM data from back
This commit is contained in:
parent
0d7b384821
commit
476a0787a1
|
@ -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": [],
|
||||
|
|
|
@ -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) =>
|
||||
|
|
|
@ -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;
|
|
@ -2,6 +2,6 @@ require('regenerator-runtime/runtime');
|
|||
|
||||
const {createMap} = require('./map');
|
||||
|
||||
require('./data');
|
||||
require('../tam/simulation');
|
||||
|
||||
createMap(/* map = */ 'map');
|
|
@ -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 () =>
|
||||
{
|
|
@ -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';
|
||||
|
Loading…
Reference in New Issue