Giter VIP home page Giter VIP logo

report-a-cybercrime's Introduction

Report a cybercrime / Signalez un crime informatique

Exploring a service that makes it easier for Canadians and businesses to report when they encounter or are victims of a cybercrime and that helps police analyze and investigate reports.

Explorer la possibilité de mettre en place un service permettant aux Canadiens et aux entreprises de signaler plus aisément les crimes informatiques et facilitant le travail d'analyse et d'enquête de la police.

Installation

Requires node.

cd f2
npm install

Running locally

Note that you must be in the f2 directory to run the code.

Set up the environment

To run with a database connection and Google Analytics enabled you will need to define some environmental variables, either in your terminal or in f2/.env.

export COSMOSDB_NAME=...
export COSMOSDB_KEY=...
export GOOGLE_ANALYTICS_ID=UA-XXXXXXXXX-X

Run with create-react-app

npm run dev

Run project with Docker

docker build -t rac .
docker run -p 3000:3000 rac

Load testing

There are simple scripts to load test the frontend. They use the k6 package, which must first be installed (see (https://docs.k6.io/docs/installation)

To run the tests, set the environment variable LOAD_TESTING_BASE_URL to the url of the website, for example

LOAD_TESTING_BASE_URL=https://report-a-scam.azurewebsites.net

and then run

k6 run -vu 150 -d10s f2/utils/loadTesting.js

Notes:

  • the http_req_duration line shows how long the requests took (from sending request to receiving response)
  • the iterations line shows the number of requests per second (should be approximately 100/s bor both)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.