Code Monkey home page Code Monkey logo

club_website_2's Introduction

UF OSC Website

standard-readme compliant GitHub issues GitHub JavaScript Style Guide GitHub Workflow Status (with branch) GitHub package.json version
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.

Table of Contents

Install

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:

  1. Development - for writing & testing new features.
  2. Staging - for testing features before deployment.
  3. Production - for finished features available to the public.

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:

  1. RATE_LIMIT_TIMEOUT - the time interval (in minutes) where the user will be locked out of the site if they violate the rate limit.
  2. RATE_LIMIT_MAX - the maximum number of requests in one RATE_LIMIT_TIMEOUT interval.

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:

  1. SMTP_HOST: host address for the SMTP server.
  2. SMTP_PORT: port for the host (see above).
  3. SMTP_USER: the server username.
  4. 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 = "[email protected]"

Maintainers

Maintained by the UF Open Source Club, can be contacted via Discord

Current Maintainers:

  • Michail Zeipekki @zeim839
  • Daniel Wildsmith @danielwildsmith

Contributing

All contributions are welcome and appreciated, so long as they adhere to the license. Contributors are urged to familiarize themselves with the contribution guidelines.

License

AGPL-3.0-or-later
Copyright (C) 2023 Open Source Club

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.