kgpmask / MASK

The website for the Manga and Anime Society Kharagpur.
https://kgpmask.club
Mozilla Public License 2.0
11 stars 4 forks source link
hacktoberfest mask-iitkgp

MASK

The website for the Manga and Anime Society Kharagpur (currently running in kgpmask.club)

Tech Stack


Running the Server

This server requires Node.js v16.0+ to run, and all tests are performed on v16. Please upgrade to Node v16 or higher if you haven't already done so.

There are multiple ways to run the server. The vast majority of the time, you will be running it in dev mode - the command for this is npm run dev. If you wish to run in regular mode, the command is npm start. Note that the server run in both cases will be identical - the only difference is that dev mode will automatically refresh changes made to the server code and/or pages, while regular mode will not. In addition, you can add flags to customize the operation of the server. These are:

In order to start the server, you will require an src/credentials.json file - contact your WebDev Team Head for this file, and do NOT share it. The only exception to this is the mongoless flag - it is recommended to use npm run dev mongoless (or npm run dm) for any page that does not involve database-related stuff.

You may also override the database connection string for testing purposes, like so:

MONGO_TEST_URL="mongodb://4.20.69.420/mask" npm dev

Furthermore, for those with access to multiple sets of credentials (the three existing types are admin, member, and github), you can switch between sets of credentials by doing the following:

Note (edited): You can now connect to the database even while on WiFi/LAN without a VPN. The domain name has been whitelisted. The IP address has NOT been whitelisted for direct http/https connections.


Templates

Pages are located as .njk files in /templates. The following variables may be set:

Additionally, the following blocks may be set: