Get symbol quotes within a date range
classes/ contains project classes
functions/ contains project scripts
public/ public folder. App should run from this directory
vendor/ contains dependent 3rd-party packages
views/ contains view files for the application
-
Install dependencies with composer. From inside your project's root directory run:
composer install
-
Copy
.env.example
to.env
and set variables according to you setup. Example:#API url SYMBOLS_CSV_URL = http://www.nasdaq.com/screening/companies-by-name.aspx?&render=download #Database DB_NAME = dbname DB_USER = root DB_PASS = #Swiftmailer MAILER_HOST = localhost MAILER_USER = MAILER_PASSWORD = MAILER_EMAIL = test@localhost MAILER_NAME = "Symbols"
-
Create a database. Make sure the database name is identical to your
.env
file.DB_NAME = dbname
-
There are two console commands the get you started. See
createdb
andgetSymbols
scripts inside the root directory.-
createdb
will create the database structure.php createdb
-
getSymbols
will download the .csv file and save it to database. We need this for dynamically searching for symbols instead of loading the all at once and overloading DOM.php getSymbols
-
-
Serve the application from inside the
/public
directorycd public/ php -S localhost:8000
-
The site can be now accessed at http://localhost:8000