Skip to content

Run the application

Veerpal Brar edited this page Apr 3, 2020 · 4 revisions

After cloning the repository, you can start working on the application by running it on a port. On your GitBash terminal, go into the local repository, and type the following commands:

cd server
npm run client
npm run start

The npm run client command compiles all the code in the Vue files into HTML, CSS and JavaScript files which can be served by the server. The npm run start command starts the server.

Then on your browser go to the url http://localhost:8081/connect/home, to see the home page. You can navigate to other pages by clicking on the different options in the navigation bar. Whenever you make a change to any of the files in the client folder, you will need to npm run client again.

Local development

If you want to run the application for testing purposes, it would be easier if the client and the server ran on different ports. To do that, type the following commands on your terminal:

cd client
npm run serve
cd server
npm run start

The npm run serve command allows you to run client code using the vue-cli-service independent of the server. Now on your browser go to the url http://localhost:8080/connect/home, to see the home page. The server is running on a different port. In order to make sure, the POST and GET requests work correctly, you will need to change the axios POST and GET urls. As an example change the url for creating new projects from /connect/post-projects to http://localhost:8081/connect/post-projects. This needs to be changed in projects.vue (in the client folder) and in routes.js (in the server folder).

Clone this wiki locally