<commit_before>var BuildService = require('./controllers/BuildService');
var TopologyService = require('./controllers/TopologyService');
var UserService = require('./controllers/UserService');
var ImageStreamService = require('./controllers/ImageStreamService');

module.exports = function(app) {

  // server routes ===========================================================
  // handle things like api calls
  // authentication routes here

  //builds routes
  app.post('/builds', BuildService.addBuild);
  app.get('/builds', BuildService.buildsGET);
  app.get('/builds/:id', BuildService.buildsIdGET);

  //users routes
  app.post('/users', UserService.addUser);
  app.get('/users', UserService.usersGET);
  app.get('/users/:id', UserService.usersIdGET);
  app.put('/users/:id', UserService.updateUser);
  app.delete('/users/:id', UserService.deleteUser);

  //topologies routes
  app.post('/topologies', TopologyService.addTopology);
  app.get('/topologies', TopologyService.topologiesGET);
  app.get('/topologies/:id', TopologyService.topologiesIdGET);
  app.put('/topologies/:id', TopologyService.updateTopology);
  app.delete('/topologies/:id', TopologyService.deleteTopology);

  //imageStreams
  app.post('/imageStreams', ImageStreamService.addImageStream);
  app.get('/imageStreams', ImageStreamService.imageStreamsGET);
  app.get('/imageStreams/:id', ImageStreamService.imageStreamsIdGET);
  app.put('/imageStreams/:id', ImageStreamService.updateImageStream);
  app.delete('/imageStreams/:id', ImageStreamService.deleteImageStream);

  // frontend routes =========================================================
  // route to handle all react requests
  app.get('*', function(req, res) {
    res.sendFile(__dirname + '/index.html');
  });

};<commit_msg>fixes node js wildcard route to handled nested paths correctly<commit_after>var BuildService = require('./controllers/BuildService');
var TopologyService = require('./controllers/TopologyService');
var UserService = require('./controllers/UserService');
var ImageStreamService = require('./controllers/ImageStreamService');

module.exports = function(app) {

  // server routes ===========================================================
  // handle things like api calls
  // authentication routes here

  //builds routes
  app.post('/builds', BuildService.addBuild);
  app.get('/builds', BuildService.buildsGET);
  app.get('/builds/:id', BuildService.buildsIdGET);

  //users routes
  app.post('/users', UserService.addUser);
  app.get('/users', UserService.usersGET);
  app.get('/users/:id', UserService.usersIdGET);
  app.put('/users/:id', UserService.updateUser);
  app.delete('/users/:id', UserService.deleteUser);

  //topologies routes
  app.post('/topologies', TopologyService.addTopology);
  app.get('/topologies', TopologyService.topologiesGET);
  app.get('/topologies/:id', TopologyService.topologiesIdGET);
  app.put('/topologies/:id', TopologyService.updateTopology);
  app.delete('/topologies/:id', TopologyService.deleteTopology);

  //imageStreams
  app.post('/imageStreams', ImageStreamService.addImageStream);
  app.get('/imageStreams', ImageStreamService.imageStreamsGET);
  app.get('/imageStreams/:id', ImageStreamService.imageStreamsIdGET);
  app.put('/imageStreams/:id', ImageStreamService.updateImageStream);
  app.delete('/imageStreams/:id', ImageStreamService.deleteImageStream);

  // frontend routes =========================================================
  // route to handle all react requests
  app.get('*', function(req, res) {
    res.sendFile('index.html', {root: './public'});
  });

};
{'fraction_non_alphanumeric': 0.21559888579387188, 'fraction_numerical': 0.0, 'mean_word_length': 5.6377079482439925, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2585250', 'n_tokens_mistral': 1018, 'n_tokens_neox': 1015, 'n_words': 170}