This repository has two workflows to build the project:
- Release: Automatically builds, releases and deploys when a new tag is pushed
- The project is compiled for production
- A new release gets posted in the GitHub repository, using contents of
latest-version-changelog.mdas release body and a zip of build results as an attachment - The build compiled project is pushed to the DIBgram GitHub Pages repository
- Build and deploy to beta GH pages: Automatically builds DIBgram after each commit and deploys to https://DIBgram.github.io/beta
- The project is compiled
- Compilations results are pushed to beta GH Pages repo
These workflows use GitHub secrets API_ID and API_HASH, which should be obtained from https://my.telegram.org for forks.
The config file contains Telegram API credentials and some options.
It is needed to compile DIBgram, but is automatically created in build workflows.
-
Obtain your API credentials from my.telegram.org
-
Create file
src/dibgram/TdWeb/config.jsand use this template to create the config file:export function getCredentials() { return { api_id: 123456, api_hash: 'abcdefghijklmnopqrstuvwxyz' }; } export function getConfig() { return { log: { log_updates: true or false, log_queries: true or false } }; }
Make sure to replace these fields with their correct value:
-
api_id: API ID from my.telegram.org -
api_hash: API Hash from my.telegram.org -
log_updates:trueif you want updates received from TdLib to be shown in developer tools console, otherwisefalse(recommendedfalse) -
log_queries:trueif you want updates received from TdLib to be shown in developer tools console, otherwisefalse(recommendedfalse)
-
You can run the app in test mode which is faster and better suited for development, and supports hot reload (changes are applied while the app is running).
-
Clone DIBgram repository
git clone github.com/DIBgram/DIBgram.git cd DIBgram -
Install all dependencies
npm install
-
Run app
npm start
After doing this, DIBgram will automatically open by opening a browser window at http://localhost:3000.
You can create an optimized build of DIBgram, for use in production.
-
Clone DIBgram repository
git clone github.com/DIBgram/DIBgram.git cd DIBgram -
Install all dependencies
npm install
-
Build
npm run build