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?
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 http://expressjs.com/en/starter/static-files.html
Great! Well done. Thanks for sharing this solution. Good luck with your project 🙂
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.
// Metronic AngularJS App Main Script
var express = request(‘express’);
var app = express();
/* 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?????
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 https://www.npmjs.com/package/gulp-connect.
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.