Ever wondered how to move your NodeRun space to a separate server? This tutorial will show you how. This tutorial can also work if you prefer to work on your own local environment.
- Download the entire workspace as a zip file (right-click workspace files to do this)
- After downloading and extracting the ZIP file you can open up and view the files with the IDE of your choice.
- Go to your developer console and type “npm install” to install all dependencies including Profound.js and Profound UI.
- If your space uses a database:
- Make sure to install the appropriate database server on your machine (if you want to fully replicate the NodeRun environment, install MariaDB, which is a variant of MySQL – on my local machine I use a free tool called HeidiSQL to help manage MariaDB)
- Download the database from NodeRun (on the database tab, right-click Tables and select Export Database as SQL) and then import it into your own database. This should include both the Table structures and the data.
- Configure Profound.js to connect to this database by modifying the config.js file and adding something like this:
- Install the related database package: npm install mysql
- Start the server using the command node start.js in your terminal.
- The application should be fully functional on your server now and you can launch it using a URL depending on your answers when you typed the “npm install” command i.e: http://localhost:8081/app
- Your Space should now be up and running inside your local environment.
For a more detailed breakdown visit our Profound docs page here: https://docs.profoundlogic.com/display/PUI/Running+NodeRun+Workspaces+in+Profound.js