Getting Started - Entropic-Visio/swe-pioneers GitHub Wiki

Installations

NodeJS For JavaScript Libraries and Dependencies

To get started with helping to contribute in this project you must first install node.js. This repository currently runs on node version 20.11.0 LTS.

Youtube Guide: How to Install Node JS (Youtube)

Download Node for your current platform.

node --version

Please also run npm --version so you can check if you have the latest node package manager version

npm --version

The command prompt should display the version of node.js for example v20.11.0. If you get this return message that means you have successfully set up node.js, otherwise you must attempt to install node.js again.

Docker Installation For Containerization

Youtube Guide: How to Install Docker (Youtube)

Ensure that you create a docker account and link it to your github.

Installing Git For Version Control

Youtube Guide: How to Install Git

We'll be using Git/GitHub Desktop for our version control. If you feel like you require a more GUI orientated approach to version control please install GitHub Desktop here.

Youtube Guide: How to Install GitHub Desktop

Setting up

After installing everything which is required, please visit the repositories code section and clone the repository.

Running Programs Locally

  1. Open up Git on your local machine.
  2. Go to the directory which you wish to clone the repository on to.
  3. Enter this into git: git clone https://github.com/Entropic-Visio/SWE-Pioneers.git
  4. After installing the repository locally please run this command in the bash terminal npm install. This command will install node.js dependencies so you can work on the modules on your local device.
  5. Ensure that you are located in the SWE-Pioneers directory and run the following command npm run dev to run the project. Notice that we are using Nodemon. Nodemon functionality is to reload the code when you have made changes and saved them, this allows for a rapid development and removes a big time waste which is re-running the code.
  6. After running the program you should see this as an output, this shows that you have successfully ran the code.
> [email protected] dev
> nodemon src/index.js

[nodemon] 3.0.3
[nodemon] to restart at any time, enter `rs`
[nodemon] watching path(s): *.*
[nodemon] watching extensions: js,mjs,cjs,json
[nodemon] starting `node src/index.js`
app listening on http://localhost:5000

Please click on http://localhost:5000 to see the website which is currently being ran.

Running Programs using Docker

  1. First go to the directory where you have cloned the repository.
  2. Open up the terminal in the directory
  3. Enter the command: docker-compose up

The output should display:

 ✔ Container front_end  Created                                                                                                                                                                                                                                            0.0s 
Attaching to front_end
front_end  |
front_end  | > [email protected] start
front_end  | > node src/index.js
front_end  |
front_end  | app listening on http://localhost:5000
  1. To view the website just click on http://localhost:5000