Skip to content

Installation

Greg Bowne edited this page Jul 13, 2023 · 1 revision

Installation

Prerequisites

Before you can install and run RadioLogger, you need to have the following software installed on your system:

Node.js Latest LTS
MongoDB v5.0.3 or later

You should use:

  • mongosh MongoDB shell
  • mongod Server

Clone the repository

To clone the RadioLogger repository from GitHub, run the following command in your terminal:

git clone https://github.com/username/RadioLogger.git

Install dependencies

To install the dependencies for RadioLogger, navigate to the /src/client and /src/server directories and run the following command in each directory:

npm install

Configure environment variables

RadioLogger requires the following environment variables to be set:

MONGODB_URI: The URI for your MongoDB database.
JWT_SECRET: A secret key for signing JSON Web Tokens.

To set these environment variables, create a .env file in the root of the client and server directories and add the following lines:

MONGODB_URI=mongodb://localhost:27017/radiologger JWT_SECRET=mysecretkey

Replace mongodb://localhost:27017/radiologger with the URI for your MongoDB database, and replace mysecretkey with a secret key of your choice.

Start the app

To start RadioLogger, navigate to the client and server directories and run the following command in each directory:

npm start

This will start the client and server, and you should be able to access RadioLogger at http://localhost:3000. Test the app To run the tests for RadioLogger, navigate to the client and server directories and run the following command in each directory:

npm test

This will run the tests for the client and server, and you should see the results in your terminal.

Deploy the app

To deploy RadioLogger to a server, you can use a service like Heroku or AWS. To build the client and server for production, navigate to the client and server directories and run the following command in each directory:

npm run build

This will build the client and server for production, and you can then deploy them to your server using the instructions provided by your hosting service.

Clone this wiki locally