Skip to content

Ben2W/PrimalPartyBackend

Repository files navigation

About

This is the Node.JS backend for PrimalParty.com, a CRUD party manager made for UCF's Junior Design class.

Live Demo of this Backend: https://www.primalparty.com/

Dummy Username: "2" Password: "password"

Live Swaggerhub of this Backend: https://primalpartybackend.azurewebsites.net/api-docs/

React Frontend Repository: https://github.com/SpartanFA/PrimalPartyFrontend

React Native Mobile Frontend App Repository: https://github.com/SpartanFA/PrimalPartyMobile

Setting up the backend

Cloning the repository

First, clone the backend repository to your local machine:

Make sure you cd into your desired directory and clone the repository with the following command:

git clone https://github.com/SpartanFA/PrimalPartyBackend.git

NOTE I recommend using Github Desktop or GitKraken which is included with Github Student



Installing Dependancies

At this stage, you need to build your node modules, you can do that with the following command:

npm install

Environment Variables

In order to have access to the remote Azure database, you need to declare an environment variable containing the database secret. You can access the keys here here

However we already set up a .env file, download the env file in the downloadables channel in discord.

NOTE the file name needs to change from env to .env, once you fixed the name simply add this file to your local primalpartybackend directory



Running the Backend

Once you installed the dependancies and added the environment variable, you can run the backend with the following command:

npm start

The server can be viewed here: http://localhost:8080/

Using Nodemon

nodemon is a useful tool for development. When you make changes the server will automatically restart.

install nodemon globally with this command:

npm install -g nodemon 

Then to run the backend with nodemon run either

npm run startdev

or 

nodemon server.js

About

Backend

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published