UF Open Source Club Website
Website for the UF Open Source Club. Started in the Fall semester 2022, this website is built and maintained by club members to serve as a hub of information for the club.
This project requires NodeJS and Git. Also, make sure you have build-essential
(Linux) or xcode-select
(MacOS).
sudo apt install build-essential
// or...
xcode-select --install
Next, begin by cloning the repository:
git clone https://github.com/ufosc/Club_Website_2.git
Navigate to the project directory and install the project dependencies:
cd Club_Website_2
npm install
Usage
Starting the webserver:
npm start
You can access the website by visiting http://localhost:3000 on your browser.
Linting & fixing:
This project adheres to the Javascript Standard syntax style, use linting to show you a list of syntax errors that you'll need to correct.
npm run lint
To automatically fix these, you can run:
npm run fix
Keep in mind that some syntax issues cannot be automatically resolved, in which case you'll need to run npm run lint
again and resolve them manually.
Running tests:
npm run test
Configuring
All configurations are available in config.js and can be modified by creating a .env
file in the root directory.
NODE_ENV:
Sets the working environment. Three options are available:
The working environment is set to 'development' by default. It can be changed by adding the following line to the .env
:
NODE_ENV = "development"
MONGO_URI:
Sets the connection URI for the MongoDB database. It can be changed by adding the following line to the .env
:
MONGO_URI = "..."
PORT:
The port to run the server on. Set to 3000 by default. It can be changed by adding the following line to the .env
:
SERVER_PORT = 3000
ADMIN_ROUTE:
Because generic admin routes are subject to directory scans by vulnerability analyzers, we've added the option to configure it manually. It is set to 'admin' by default, but can be changed via the following option:
ADMIN_ROUTE = "admin"
LIMITER:
The limiter sets up a rate limiter that controls how many requests can be made by a user before they are timed-out. There are two available options:
They can be modified as follows:
RATE_LIMIT_TIMEOUT = 5
RATE_LIMIT_MAX = 1500
CACHE_INTERVAL
How long to cache static pages (blog, index, etc.) for. Instead of repeatedly querying the database for data, non-priority pages are cached. The cache interval (in minutes) can be modified like so:
CACHE_INTERVAL = 30
SECRET:
The secret is a key for encrypting JWTs. It can be modified like so:
'''
SECRET = "any string"
'''
SMTP:
Configurations for the SMTP mailer. This is disabled in development environments, but can be modified with the following options:
SMTP_HOST
: host address for the SMTP server.
SMTP_PORT
: port for the host (see above).
SMTP_USER
: the server username.
SMTP_PASS
: the server password.
ADMIN_EMAIL
The email address to send contact form confirmation emails from. Can be set to anything so long as its a valid email address. Modified as follows:
ADMIN_EMAIL = "no-reply@ufosc.com"
Maintainers
Maintained by the UF Open Source Club, can be contacted via Discord
Current Maintainers:
Michail Zeipekki @zeim839 Daniel Wildsmith @danielwildsmith ContributingAll contributions are welcome and appreciated, so long as they adhere to the license. Contributors are urged to familiarize themselves with the contribution guidelines.
LicenseAGPL-3.0-or-later
Copyright (C) 2007 Free Software Foundation, Inc.
版权声明:
1、该文章(资料)来源于互联网公开信息,我方只是对该内容做点评,所分享的下载地址为原作者公开地址。2、网站不提供资料下载,如需下载请到原作者页面进行下载。