-
Notifications
You must be signed in to change notification settings - Fork 1
Setting up the Venue dev environment
Ready to get a working branch of Venue up and running on your local machine to begin development? Curious on how Venue works behind the scenes? Or maybe just wanted an established website to use as a sandbox for learning the ropes of Vue, Mongo and Node.js? Then this guide is for you!
Node JS is a dynamic package manager that can be used to quickly install modules and segments of code to be used in larger projects. Run the installer and let it finish before proceeding to step 2, Node JS is needed to install modules that Venue uses while it runs.
Mongo DB is a local database server that can be used to simulate adding, deleting and manipulating data in development, so problems can be detected with fake data instead of real user data when the site is running.
Venue download the ZIP file here and extract it in whatever folder you're comfortable with, this will be your production environment. It's recommend to setup some structure like this workspace/Venue2-master
Don't have an IDE yet? Download one here! Although Visual Studio Code is not the only IDE for development, it is recommended because of its expansive list of extensions that make it quick and easy to program in almost any language.
1). Set up your workspace If you are new to VS code, you will be asked to select a workspace folder, select the folder that the Venue master branch is in, as you will most likely be working with multiple branches later on, but your workspace settings are up to you.
2). Navigate to the root folder Your terminal should read something like workspace\venue2-master>
Alternatively in Visual Studio Code, you can right click the folder and select Open Terminal Here
3). Install the NPM modules Run npm install
and you should see a progress bar spring up as npm leaps into action. The previously mentioned modules are being installed. If this is successful you will need to navigate to \server
and npm install
again. If an error message pops up saying something to the degree of npm not recognized as an external batch program, script or cmdlet
you will need to follow this guide to setup your terminal to recognize what npm
means. Same for mongodb
if you do not see it listed.
4). You are ready to launch Venue This part can get a little tricky, as it requires three terminals to be running at the same time, but the commands are very straightforward. Open the first terminal to the server
folder and run mongodb
if everything is done correctly the last message you should see should say something to the degree of WAITING FOR CONNECTIONS
The second terminal also is run at server
and this time you will run npm run seed
as the command, this will fill your mongo database with test data. After that finishes, run nodemon server
and if done correctly one of two messages will be shown Ready for connections on port XXXX
or No Auth Key
. If you receive the message No Auth Key
you will need to ask for "the secret file" and put it the root directory (one folder up from \server) when you recieve it. The last terminal will be run in the root directory, venue2-master
and this time you will run npm run serve
and if everything is well and good you will see Now running server at local IP: http://xxx.xxx.xx.xx:8080 and http://localhost:8080
If you CTRL+CLICK http://localhost:8080
you should be able to log in with one of the test accounts and able to explore and work on the site. If npm run serve
throws an error saying a module is missing, you can most likely npm install [Module]
and have npm find and install the module it claims to be missing.