This topic contains 4 replies, has 3 voices, and was last updated by Sean Sean 2 years, 7 months ago.

Angular Theme with Express.js + Node.js doesn't work

  • yacafx

    Posts: 1
    Member Reply #7652


    I try to use te theme and as standalone works fine, but when I try to use ir with a Express/node server Angular doesent load correctly 🙁 The errors that i receive is

    Uncaught SyntaxError: Unexpected token <

    I attach a couple of screenshoots.


    ¿Can you help me please?

    Error 1


    Posts: 1
    Member Reply #7653

    I solve it! =D

    I need to specify the folder with my js files for Express can serve static files:

    app.use(express.static(__dirname + ‘/public’));

    app.use(express.static(__dirname + ‘/public/app’));


    I found that info on


    Posts: 4527
    Support Staff Reply #7658

    Great! Well done. Thanks for sharing this solution. Good luck with your project 🙂


    Posts: 4
    Member Reply #9291

    Hi. I could not get it.

    I’m trying to set a MEAN app, but when I try to set the express on main.js (on js folder) it doen’t work.

    like that:


    // Metronic AngularJS App Main Script


    var express = request(‘express’);


    var app = express();



    app.use(‘/’, express.static(‘deepfreeze/views’));


    /* Metronic App */

    var DeepFreezeApp = angular.module(“DeepFreezeApp”, [







    I’m also trying to serve the app on port 3000, instead of 8080.

    But when I set an app.js file calling it, all the js and css files could not be found. I receive a console log as 404 status.

    How can I serve the Angular version with Express????? Please, anyone can help me?????


    • This reply was modified 2 years, 7 months ago by  chrispalmezan.

    Posts: 4527
    Support Staff Reply #9302


    First you should check the issue outside the theme and make sure the port you are accessing is working.
    Metronic including gulp task to launch a localhost using
    You can check(if haven’t yet) the documentation “_documentation/index.html” and try to launch the gulp localhost server.

    If you need any further help please let us know.


You must be logged in to reply to this topic.