-
-
Notifications
You must be signed in to change notification settings - Fork 58
New v4.0.0 beta.x Installation
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).
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
andknexfile.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:
- Run
npm install reldens
- Create the
.env
configuration file manually (I think you could avoid the Knex file if you don't pretend to use the migrations, see below). - Require the module and provide the parameters as specified in the skeleton example (see https://github.com/damian-pastorini/reldens-game-test/blob/master/index.js).
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
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).