Skip to main content

Ajouter une Méthode sur le serveur NodeJS

    1. CloneIl thefaut uniksimajouter depotune withméthode thede old_loginroutage branchpour commencer : https://gypso@bitbucket.org/gypso/uniksim.git  
    2. Run
    npm install in the main directory Install and run Xampp
    expressServer.get('/methodName/:param1/:param2/:param3', (Installationreq, locationres) (by default) -=> C:\xampp{
    getTexts(req.params.param1, req.params.param2, req.params.param3, function(data) {
    res.send(JSON.stringify(data))
    ;
    Make the <uniksimroot>/public folder the root of a php virtual host
      Add the following lines to C:\xampp\apache\conf\extra\httpd-vhosts.conf

      <VirtualHost *:80>});
           ServerAdmin webmaster@localhost
           DocumentRoot <uniksimroot>/public
           ServerName uniksimdev
           ServerAlias www.uniksimdev
           <Directory "<uniksimroot>/public">
               Options All
               AllowOverride All
               Require all granted
           </Directory>
      </VirtualHost>


          Add the following lines to C:\windows\system32\drivers\etc\hosts

          127.0.0.1 localhost

          127.0.0.1 uniksimdev


            Edit your user variables
              Right-click on your Computer in the File Explorer and go to Properties Go to the Advanced system settings and click on Environment Variables Find Path in the system variables box, and add the following path to the end of the Path variable string.

                                 });C:\xampp\php


                Run php composer.phar install in the main directory Start the Apache and the MySQL modules in the Xampp Control Panel Setup in phpMyAdmin
                  Open the Admin panel of the MySQL module in the Xampp Control Panel Create a new database named uniksim with the utf8_general_ci collation Within the SQL tab in the new database, setup the database structure by running the content of <uniksimroot>/uniksim_example.sql  Setup the game
                    Get the current game version for the client in the constant table within the uniksim database in phpMyAdmin and add the folders builds/<client_version> in <uniksimroot>/public/ Copy your Unity build to the <client_version> folder Duplicate <uniksimroot>/.env.example and rename it .env Install Redis for Windows Install Visual Studio Code and open it, drag and drop <uniksimroot>/node.js, and run the
                    Server debug configuration