Git Product home page Git Product logo

kissmoperl's Introduction

Setting up and Running the KISSmo Perl

To set up and run the Perl code you provided, follow the steps below. This guide assumes you are using a Unix-like system (e.g., Linux or *BSD or macOS) and have Perl installed.

Step 1: Install Required Modules

Before running the code, you need to install the required Perl modules. Open your terminal and execute the following command:

cpanm Mojolicious DBI File::Slurp

or

cpan install Mojolicious::Lite

cpan install DBI

cpan install File::Slurp

This command uses the cpanm tool to install the necessary modules (Mojolicious, DBI, and File::Slurp). If you don't have cpanm installed, you can install it by running cpan App::cpanminus.

Step 2: Create the SQLite Database

The code uses an SQLite database to store the pastes. Create an empty SQLite database file named pastes.db in the same directory as the Perl script. You can do this with the following command:

touch pastes.db && mkdir pastes

Step 3: Run the Perl Script

Once you have installed the modules and created the database file, you can run the Perl script. Open your terminal and navigate to the directory containing the script (cd path/to/script). Then execute the following command:

perl paste.pl daemon -m production -l http://0.0.0.0:7878

This command starts the Mojolicious application as a daemon process. You should see output similar to:

[Sun Jun 23 12:34:56 2023] [info] Listening at "http://ip:7878"

Step 4: Access the Application

Open a web browser and visit http://ip:7878 to access the application. You should see a web page with a text area where you can enter your content.

Step 5: Test the Application

You can test the application by entering some content in the text area and clicking the "Create paste" button. The application will generate a unique ID for the paste and display the paste's details.

Step 6: Accessing Raw Paste Data

To access the raw content of a paste, you can click the "RAW" button on the paste's detail page.

That's it! You have successfully set up and run the Perl script. You can continue using the application by creating and accessing pastes through the web interface.

Note: Remember to keep the terminal running while you want the application to be accessible. You can stop the application by pressing Ctrl+C in the terminal.

KISSmo 1.1.7 Release note

https://github.com/hedho/KISSmoPerl/releases/tag/v1.1.7

Demo:

https://paste.hax.al/

kissmoperl's People

Contributors

hedho avatar

Stargazers

 avatar

Watchers

 avatar

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.