Installing Cryptomask Server
Prerequisites
To run Cryptomask server you need the below prerequisites.
Windows/Mac OS/Ubuntu Server with 4GB RAM
Node JS Version 18.18.0
PostgreSQL Version 15.4 (stable)
Quickstart
Running the server is straightforward. To get started, configure the service application by updating the necessary values in the .env file.
NODE_ENV=development
BACKEND_PORT=3001
SECRET=SUPER_SECRET_TOKEN_NEVER_DISCLOSE
DATABASE_URL="postgresql://<REPLACE_USERNAME>:<REPLACE_WITH_YOUR_POSTGRES_PASSWORD>@localhost:5432/cryptomask"
MORALIS_API_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJub25jZSI6IjNjNTBjYjQxLTExNTktNDgzNS1iZTU1LWMwMmUyNTNmOTAxMyIsIm9yZ0lkIjoiMzU0MTI2IiwidXNlcklkIjoiMzYzOTcwIiwidHlwZUlkIjoiN2EzYTE2YzItYTBjNS00Nzg5LWI1OGQtMjkyZmM4MjM5MGU0IiwidHlwZSI6IlBST0pFQ1QiLCJpYXQiOjE2OTI2ODI1MjUsImV4cCI6NDg0ODQ0MjUyNX0.i-2kfCVT0Jfw0USaSTTVM6eQg2pbrZMNO1YwplIObsYThe
SECRETis a password you choose, and it’s crucial to keep it highly confidential. This value is used to sign JWT tokens, ensuring the security of your application.To obtain you your
MORALIS_API_KEYfrom below link
Installing Node JS
Download and run the NodeSource setup script for Node.js 18
Install Node.js
Verify installation
Install Node JS Using Homebrew
Install Node.js
Verify the Installation
Install Node JS using the Official Installer
Download the Node.js Installer:
Go to the Node.js official website.
Click on the "Previous Releases" link to find version 18.8.0.
Download the appropriate installer for your system (e.g., 64-bit MSI).
Run the Installer:
Double-click the downloaded
.msifile.Follow the installation wizard:
Accept the license agreement.
Choose the installation directory.
Enable the option to add Node.js to the PATH.
Installing Cryptomask Server dependencies
Open terminal in the root of the server script and run the below command to install project dependencies.
Migrate database
To start development server, run
Running in Production server
To run this backend service in a production environment you need to install PM2 and run the script as service. Follow below instruction for achieve this.
Installing PM2 as global node module
And run below command to spin up the production server
Last updated