How to Start with GoCore
This section describes the steps for deploying and performing the initial launch of a project based on the GoCore kernel.
1. Environment Preparation
DBMS (MariaDB)
The Core requires MariaDB version 10 or higher.
- You can install it directly on your main OS or deploy it in a container.
- The Core does not handle automatic DBMS deployment (separate scripts exist for servers; see the DevOps section).
- For connection, you will need:
- Host:
127.0.0.1(orlocalhost) - Port:
3306 - Login and password of a user with permissions to create databases (you can use
rootor create a separate user).
- Host:
2. Obtaining the Codebase
- New Project: Obtain a copy of the “clean” Core. Initialize a Git repository and place the code in it.
- Existing Project: Request access to the project repository and clone it to your computer.
3. Initial Build
You must perform an initial build of the frontend part and install dependencies.
-
Run the
firstBuildscript frompackage.json:npm run firstBuildThis script sequentially executes:
npm i && cd public && npm i && cd .. && babel public_src --out-dir public --copy-files. -
For subsequent frontend development, use the command:
npm run watch
4. Configuration Setup
config/config.json File
The configuration file is excluded from Git and is created automatically during the first run. After creation, it must be edited.
- Start the project (using the
npm run runcommand ornode bin/www.js). - Wait for an error about DB settings to appear, then edit the created
config/config.jsonfile.
Key Parameters:
- Host and Launch Port: See config.json Parameters -> Host and Launch Port. Default is
0.0.0.0; changing to127.0.0.1is recommended. - DBMS Connection: Configure the
mysqlConnectionsection (see config.json Parameters -> mysqlConnection Section).
Other parameters can be left unchanged for the first launch.
5. Launch and Debugging
TypeScript Compilation
The Core is shipped with pre-compiled code (JS), but for TS development, you will need compilation:
- In WebStorm: Enable the “Recompile on changes” option in TypeScript settings (TS icon in the bottom status bar).
- In the terminal: Run
tscor usenpm run tsc.
Main Process
Start the server:
npm run run
# or
node bin/www.js
Using an Alternative Config
You can launch the project with a different configuration file (e.g., for debugging on a production database copy):
node bin/www.js prod.json
The file must be located in the config/ directory.
Authorization
After launching, navigate to the link displayed in the console.
- Default login credentials (on a clean database):
- Login:
admin - Password:
123
- Login:
Important Notes for the First Launch
- First Launch:
config.jsonis created, and the process ends with a DB connection error. - Second Launch: After configuring the connection, the Core begins importing the DB dump from the
DB/ccs.init.sqlfile. This takes some time. - Wait for the message:
INFO: cMysql.getConnection. Database has been filled. Enjoy your work!. - Restart the process once more.
Note: Messages in
console.errorduring startup are normal (they are used to highlight important system events in logs). Read them carefully, but only panic if errors occur while the already-launched server is running.
6. Developer Summary
- Backend: Any code changes (except edits to
tables.json) require a process restart. - Frontend: Sources are in
public_src, build results are inpublic. Usenpm run watch. - Documentation: Before starting full-scale development, it is recommended to read the General Concept Description section.