Skip to content

PedroGarciaOT/DebrickedDemoApp

 
 

Repository files navigation

DebrickedDemoApp

Table of Contents

Overview

This is an example JavaScript NodeJS/Express Web Application for use in Debricked scenarios and demonstrations.

Please note: the application should not be used in a production environment!

Running the Application

To run the application you will need to have installed Docker and docker-compose. On Windows you can use Docker Desktop - ensure you are using Linux containers. The provided docker-compose.yml file will download/run a container for MySQL and Adminer as well as the application itself.

To start the application, execute the following from a command line:

docker-compose --profile dev up --build

The application "app" will wait for the MySQL database to be available and then create the database it requires - this will take approx 30-40 seconds.

You can then navigate to the URL: http://localhost:3000.

The website allows you to login with the following default users:

There should be some sample data pre-loaded.

Once you have finished with the application, use Ctrl-C to stop docker-compose. If you want to remove the containers you can execute the following command:

docker-compose --profile dev rm

Developing the application

To develop the application you will need to have first installed NodeJS.

If you want to make changes to the application, you should first bring up the MySQL and Adminer containers using the following command:

docker-compose --profile mysql up -d

Next, install the required node modules locally using:

npm install --save
npm install -g nodemon

Now you can create and populate a development database using:

node .\src\sql\dbCreate.js

Finally you can start the application using:

npm run dev

Browse to http://localhost:3000 and login with the same accounts as above.

As this is a Node/Express app started using nodemon you can make changes to the code and they will be automatically reflected in the app. Note: A Visual Studio solution file (IWAExpress.sln) and NodeJS project file (IWAExpress.njsproj) are also included so you can run and develop the application within Visual Studio.

Developing and Contributing

Please see the Contribution Guide for information on how to develop and contribute.

If you have any problems, please consult GitHub Issues to see if has already been discussed.

Licensing

This application is made available under the GNU General Public License V3

About

An insecure NodeJS/Express web application for use in Debricked demonstrations

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • CSS 50.3%
  • JavaScript 27.0%
  • HTML 22.4%
  • Dockerfile 0.3%