Skip to content

GuyShuster/BPjsOnlineIDE

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BPjsOnlineIDE: An Online Environment For The BPjs Language

BPjs is a library for executing behavioral programs written in Javascript. It can be used from the commandline, or embedded in a Java application.
BPjs is an open source project, maintained by a research group in Ben-Gurion University of the Negev, Israel.

Project Prerequisites:

Client:

Server:

Installing And Building The Project For The First Time:

First, clone/download the project from the git repository.

Client:

Through the terminal (cmd or the terminal on the IDE itself), navigate to the BPjsOnlineIDE\OnlineIDEClient\my-app folder.
Then, run the 'npm install' command and all the dependencies should install automatically.
When the installation is finished, you can run the project as explained in the "Running The Project" section.

Server:

If you are indending to run and build the server from the command line, and edit the code via some text editor (not an IDE), skip this section and go to the next one - it has a detailed explanation.
If you are using IntelliJ, these are the steps you should take:

  1. Import the OnlineIDEServer folder as a Maven project.
  2. Run -> Edit Configurations -> + sign -> Tomcat Server -> Local
  3. Click 'Configure' and navigate to your Apache server folder.
  4. Click on the 'Deployment' tab -> + sign -> Artifact -> OnlineIDEServer:war
  5. IMPORTANT: Change the 'Application context' from /OnlineIDEServer_war to /OnlineIDEServer.
    The client accesses the server on that address (at least when developing).
    Check that the server address is http://localhost:8080/OnlineIDEServer/ and you're good to go! More information about Tomcat and IntelliJ here https://www.jetbrains.com/help/idea/run-debug-configuration-tomcat-server.html#.

Running The Project:

Client:

Through the terminal (cmd or the terminal on the IDE itself), navigate to the BPjsOnlineIDE\OnlineIDEClient\my-app folder.
Then, run the 'npm start' command and access the client side on localhost:4200 on any browser.
Npm comes with a 'Nodemon' service built in it, so the node server will automatically restart when file changes in the package directory are detected.

Server:

After installing and building the server for the first time like explained in the previous section, running it on any IDE should be pretty straightforward. Just choose the 'Run on server' (exact name might differ from one IDE to another) and the server should be up and running on localhost:8080/OnlineIDEServer/.
Just don't forget to ctrl+F10 (update server) every time you update your code...

If you want to run the server from the terminal, follow these steps:

  1. If you haven't built the server already (no 'target' folder in BPjsOnlineIDE\OnlineIDEServer), navigate to that folder through the terminal and run 'mvn install'. After that's done, a 'target' folder should appear.
  2. Copy the 'OnlineIDEServer' folder from the 'target' folder into the apache-tomcat-9.0.30\webapps folder (version number is redundant).
  3. Open the terminal in apache-tomcat-9.0.30\bin and run the 'startup' command. After that, the server should be up and running on localhost:8080/OnlineIDEServer/. Run the 'shutdown' command to terminate.
    Please note: If you choose to edit the code through an the Intellij IDE (or most modern ones), the code will be built automatically every time you update (ctrl+F10) the code (depends on the settings). If you choose to work through a command line only, you will have to do steps 1-3 manually every time you want to test updated code.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published