Ionic getting data with sequelize and express.js

I have been struggling with this for a while now and can’t find anything on the Internet about it, so I was wondering if somebody has any experience getting data in Ionic with Sequelize and the routing with Express.js.

This is wat I got:


var express = require('express');
var app = express();
var path = require('path');

var routes = require('./routes/index');
var cars = require('./routes/cars') (app);

app.use('/cars', cars);


var models  = require('../models');
var express = require('express');
var router    = express.Router();

router.get('/cars', function(req, res) {
      console.log("ops: " + error);
    res.status(500).json({ error: 'error' });

module.exports = router;


"use strict";

module.exports = function(sequelize, DataTypes) {

    var Car = sequelize.define("Car", {
        name: DataTypes.STRING,
        favorite:  DataTypes.INTEGER
    }, {
        freezeTableName: true,
        tableName: 'car'
    return Car;

I have tried multiple ways to get this to work, but when I go to http://localhost:8100/cars the browser outputs:

Cannot GET /cars

Can anyone please help me?