Skip to main content

Run Meteor from within a folder

I've run meteor build to create my bundle, uploaded to the server, it runs fine, however the .css and .js paths are wrong, as it's using the root url. I need to run this from within a /project folder. Again it's running, but 404 on the files as they're not prefixed with /project.


eg. http://domain.com/65d054cb90ff094804072528d222178ddbf625e22.js?meteor_js_resource=true 404 (Not Found)

needs to be http://domain.com/project/65d054cb90ff094804072528d222178ddbf625e22.js?meteor_js_resource=true


I've tried using ROOT_URL=http://domain.com/project node main.js, that gives an unknown path error, i've also tried using Meteor.absoluteUrl('project', {}); in conjuntion with rooturl but again, no avail.

Any of you fine people have any ideas? :) Thanks!

PS. It's running on an apache server with ProxyPass, if that's of relevance.

Solved

You could instruct your apache to redirect those calls with a ProxyPassMatch, such as:


    ProxyPassMatch http://localhost/project/$1meteor_js_resource=true


Comments

Popular posts from this blog

404 HEAD issue when creating AWS Elasticsearch index

I am trying to create my first index using python and I keep getting a 404 index not found exception. Here is the current code: es = Elasticsearch([{'host': 'host_url', 'port': 443, 'use_ssl': True, 'timeout': 300}]) if es.indices.exists('test_logs'): es.indices.delete(index = 'test_logs') request_body = { 'settings': { 'number_of_shards': 2, 'number_of_relicas': 2 }, 'mappings': { 'logs': { 'properties': { 'date': { 'index': 'not_analyzed', 'type': 'date' }, 'time': { 'index': 'not_analyzed', 'type': 'time' }, 'request': { 'index': 'not_analyzed', 'type': 'string' }, 'status': { 'index': 'not_analyzed', 'type': ...

How to grab a certain data from Array?

I am new to Javascript / Ionic so I try to wrap my head around different concepts. I have a function that retrieve the users like this : $timeout(function(){ $scope.users = snapshot1.val(); console.log($scope.users); }) Which gives me the information in the console. Now, I would like to isolate the field "name" but when I do : snapshot1.val().name; It does not work. Is there a way to grab only a specific field ? Solved console.log(snapshot1.val().map(el=>el.name)); If its really an Array, you can generate a new Array containing just the name property using Array.prototype.map...

What is the right way to pass a value from the UI to another thread?

I have the MainActivity thread which contains a Fragment class. The purpose of that fragment is to allow user to connect to a Bluetooth device. After the user is connected the ConnectedThread starts its while loop which is listening to incoming bytes. In the MainActivity I have a Boolean value which changes based on whether checkbox is checked or not. I would like to pass that value from the MainActivity to that while loop when it changes. So the question is, what is the right way to do that? Is there any trick like a handler for that? Or should I pass the context to the ConnectedThread and then set a listener for that in the ConnectedThread class? Solved you can use interface as callback here. declare an interface in your MainActivity and have your class with connected thread implement it. once value changes in MainActivity trigger the callback method and you can pass your variable as a parameter to other class.