Giter VIP home page Giter VIP logo

Comments (9)

alaa-eddine avatar alaa-eddine commented on August 15, 2024

if eureca code is run in your server machine then /eureca.js should be accessible from client machine.
what does the browser console say about it ?

can you show your client/server codes ?

from eureca.io.

magicmike avatar magicmike commented on August 15, 2024

Absolutely, thank you for the help.

Server code: (app.js)
//============================================
// Copied directly from http://eureca.io/ homepage first example.
//=====================================================

Client code: (index.html)
//============================================
<!doctype html>
<html class="no-js" lang="">
    <head>
        <title></title>
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <link rel="stylesheet" href="css/main.css">
        <script src="https://code.createjs.com/easeljs-0.8.1.min.js"></script>
        <script src="/eureca.js"></script>
        <script src="./js/Button.js"></script>
        <script src="./js/Card.js"></script>
        <script src="./js/PlayerState.js"></script>
        <script src="./js/easelInit.js"></script>
    </head>
    <body onload="init();">
    <script>
        var client = new Eureca.Client();
        client.ready(function (serverProxy) {
            serverProxy.hello();
        });
    </script>
    </body>
</html>

from eureca.io.

alaa-eddine avatar alaa-eddine commented on August 15, 2024

do you see any error in the browser console ?

find eureca.js in the networking tab of the browser console, it should tell you if the script is loaded or not.

from eureca.io.

magicmike avatar magicmike commented on August 15, 2024

It loaded. All my other javascript files (which previously worked) are now 404, not found.

from eureca.io.

alaa-eddine avatar alaa-eddine commented on August 15, 2024

there are chances that you have something wrong in the server or client side.
this is not related to eureca but to your network.
try to run the application in a local server first.

from eureca.io.

magicmike avatar magicmike commented on August 15, 2024

Yes. I got it working. Thanks for your help.

from eureca.io.

alaa-eddine avatar alaa-eddine commented on August 15, 2024

welcome :)

from eureca.io.

amytilly avatar amytilly commented on August 15, 2024

I get the same error. I've a normal node.js/express server installed.

Here my server code :

var app = require('../app');
var debug = require('debug')('eureca.io:server');
var http = require('http');
var Eureca = require('eureca.io');

var port = normalizePort(process.env.PORT || '3000');
app.set('port', port);

var server = http.createServer(app);

// eurecaServer init
var eurecaServer = new Eureca.Server();
eurecaServer.attach(server);

on client side :

load file : src="/eureca.js"

var rpcClient = new Eureca.Client();

I get always 404 in my browser.

I've tried also {transport: 'sockjs'} but i get the same error.

Please, can you help me ?

from eureca.io.

alaa-eddine avatar alaa-eddine commented on August 15, 2024

Hi @amytilly , if you are getting 404 errors, this is mostly related to your server or network setup.
eureca.io don't setup its own server, it use an existing one.

if you disable all eureca.io stuff, are your static files accessible ?

from eureca.io.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.