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:
knexfile.js, in both cases the main changes should be for the database connection and probably your server URL.
- Go NPM crazy! 😄 run
The alternative is:
npm install reldens
- Create the
.envconfiguration 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).
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:
Or from the repository: 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
3 - That's it!
Unless you get any issues.... that's it! Run $ npm start and be happy!
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 Polly-fill to make it work).