Browse Source

Extract TaM simulation from front and TaM data from back

master
Mattéo Delabre 7 months ago
parent
commit
476a0787a1
Signed by: matteo <spam@delab.re> GPG Key ID: AE3FBD02DC583ABB
15 changed files with 9 additions and 9 deletions
  1. +2
    -2
      package.json
  2. +2
    -2
      script/update-network
  3. +0
    -0
      src/back/.eslintrc.json
  4. +2
    -2
      src/back/index.js
  5. +0
    -0
      src/front/.eslintrc.json
  6. +0
    -0
      src/front/index.html
  7. +1
    -1
      src/front/index.js
  8. +1
    -1
      src/front/map.js
  9. +0
    -0
      src/tam/network.js
  10. +0
    -0
      src/tam/network.json
  11. +0
    -0
      src/tam/realtime.js
  12. +1
    -1
      src/tam/simulation.js
  13. +0
    -0
      src/tam/sources/osm.js
  14. +0
    -0
      src/tam/sources/tam.js
  15. +0
    -0
      src/util.js

+ 2
- 2
package.json 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": [],


+ 2
- 2
script/update-network 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) =>


back/.eslintrc.json → src/back/.eslintrc.json View File


back/index.js → src/back/index.js 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;

front/.eslintrc.json → src/front/.eslintrc.json View File


front/index.html → src/front/index.html View File


front/index.js → src/front/index.js View File

@@ -2,6 +2,6 @@ require('regenerator-runtime/runtime');

const {createMap} = require('./map');

require('./data');
require('../tam/simulation');

createMap(/* map = */ 'map');

front/map.js → src/front/map.js 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 () =>
{

back/data/network.js → src/tam/network.js View File


back/data/network.json → src/tam/network.json View File


back/data/realtime.js → src/tam/realtime.js View File


front/data.js → src/tam/simulation.js 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';


back/data/sources/osm.js → src/tam/sources/osm.js View File


back/data/sources/tam.js → src/tam/sources/tam.js View File


back/util.js → src/util.js View File


Loading…
Cancel
Save