Giter VIP home page Giter VIP logo

search-engine's Introduction

search-engine

Installation

Assumptions prior to install

  • Python 3 is installed and accessible from the path

Setting up a venv and activating it

Linux instructions

Run the following commands

  • Note that if you are using the fish shell to use "activate.fish" instead of "activate"
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt

Windows instructions

Run the following commands

py -3 -m venv venv
venv\Scripts\activate
pip3 install -r requirements.txt

If you encounter the following error or something similar:

venv\Scripts\activate : File C:\Users\Raymo\Desktop\blah\search-engine\venv\Scripts\Activate.ps1 cannot be
loaded because running scripts is disabled on this system. For more information, see about_Execution_Policies
at https:/go.microsoft.com/fwlink/?LinkID=135170.
At line:1 char:1
+ venv\Scripts\activate
+ ~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : SecurityError: (:) [], PSSecurityException
    + FullyQualifiedErrorId : UnauthorizedAccess
  1. Open PowerShell in Administrator mode
  2. Input this in the prompt
set-executionpolicy remotesigned
  1. Say yes

Reference: https://superuser.com/questions/106360/how-to-enable-execution-of-powershell-scripts

Deactivating a venv

Run the following command

deactivate

Viewing installed packages

  • You can see your installed requirements from pip using the command
pip freeze

Running the application

Reference - https://flask.palletsprojects.com/en/1.1.x/quickstart/

  • Be in the root directory of the repository when you run these commands
  • Note the setting of the FLASK_ENV variable enables debug mode
    • The indexes and corpus will NOT be rebuilt when development mode is set

Linux instructions

Run the following commands

export FLASK_APP=searchapp/searchapp.py
export FLASK_ENV=development
flask run

Windows instructions

Powershell Instructions

Run the following commands

$env:FLASK_APP = "searchapp/searchapp.py"
$env:FLASK_ENV = "development"
flask run
CMD Instructions

Run the following commands

set FLASK_APP=searchapp/searchapp.py
set FLASK_ENV=development
flask run

Project Structure

Based on:

search-engine's People

Contributors

rkchang avatar tpaul016 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.