Skip to content

New v4.0.0 beta.x Installation

Damian A. Pastorini edited this page Mar 22, 2020 · 6 revisions

Version >= V4.0.0-beta.6 Installation Process

About this document

In general the process could be strait forward without any issues but I'll describe different options on each step so you can choose what makes you feel comfortable. Considering this is a full-platform you will need the code and a database (for now only MySQL is supported).

1 - Project Root

First let's go for the code, the easiest way, checkout the example!

  • Checkout the sample skeleton app from: https://github.com/damian-pastorini/reldens-game-test
  • Change the configuration files contents: .env and knexfile.js, in both cases the main changes should be for the database connection and probably your server URL.
  • Go NPM crazy! 😄 run npm install
  • Unless you get any issues.... that's it! Run npm start and be happy!

The alternative is:

2- Storage

Since v4.x we migrated all the storage management to be done by Objection JS which is based on Knex JS.

Because of that we were able to replace the old db-migrate implementation by Knex Migrations.

In order to install the database now you have two options:

1 - Import the installation SQL file directly in your database (using any client or 3rd party app). You will find the installation file in the project root:

[project-root]/node_modules/reldens/migrations/production/

Or from the repo: https://github.com/damian-pastorini/reldens/tree/master/migrations/production

2 - Use Knex:

Make sure you have it globally:

$ npm install knex -g

And then run the migration command:

$ npm run install-db

IMPORTANT:

If you have any issues with this version please ping me on Discord, it could be related to missing configurations in the database for which I can provide a new dump, or it could be related to the Parcel-Babel fixes (since async/await is been used now in the client side classes and we need Pollyfill to make it work).