This article illustrates how to test the Sample Application with Angular.js written by Christophe Coenraets on the Linux embedded boards based on CORE9G25 module.

Install MySQL server

Run a SSH terminal session with the CORE9G25 the install MySQL package by typing:

debarm:~# apt-get update
debarm:~# apt-get install mysql-server

Remember the password used during the MySQL installation.

Make a copy on Coenraets tutorial files

Clone the tutorial tree from GitHub:

debarm:~# cd /var
debarm:/var# git clone git://github.com/ccoenraets/angular-cellar.git
...

Rename the original web server document root and use the tutorial file tree as new document root directory:

debarm:/var# mv www www_old
debarm:/var# mv angular-cellar www

Create the MySQL database

Create a db called cellar:

debarm:/var# cd www                                                             
debarm:/var/www#
debarm:/var/www# mysqladmin -u root -p create cellar                    
Enter password: [type the MySQL installation password]

Fill the new db with the tutorial table:

debarm:/var/www# mysql cellar -u root -p < cellar.sql                   
Enter password: [type the MySQL installation password]

Check the table contents:

debarm:/var/www# mysql
mysql> SELECT name,country from wine;                                                                                                  
+---------------------------+-----------+
| name                      | country   |
+---------------------------+-----------+
| CHATEAU DE SAINT COSME    | France    |
| LAN RIOJA CRIANZA         | Spain     |
| MARGERUM SYBARITE         | USA       |
| OWEN ROE "EX UMBRIS"      | USA       |
| REX HILL                  | USA       |
| VITICCIO CLASSICO RISERVA | Italy     |
| CHATEAU LE DOYENNE        | France    |
| DOMAINE DU BOUSCAT        | France    |
| BLOCK NINE                | USA       |
| DOMAINE SERENE            | USA       |
| BODEGA LURTON             | Argentina |
| LES MORIZOTTES            | France    |
+---------------------------+-----------+
12 rows in set (0.00 sec)
mysql> quit 

Configure the web server lighttpd

Add in /etc/lighttpd/lighttpd.conf the rewrite module mod_rewrite in server.modules.

server.modules = (
    "mod_access",
    "mod_alias",
    "mod_accesslog",
    "mod_compress",
    "mod_redirect",
    "mod_rewrite",
)

add also this line:

url.rewrite-if-not-file = ("/api/(.*)" => "/api/index.php/$0")

restart the lighttpd daemon by typing:

debarm:~# /etc/init.d/lighttpd restart  
Stopping web server: lighttpd.          
Starting web server: lighttpd.

Now open your browser and try the Wine Cellar application.

Links

Documentation Terms of Use
The Acme Systems srl provides this Debian system development and user manual.
The origin of these doc came from the website: http://www.acmesystems.it
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.
Creative Commons License


Market Mail : market@armdevs.com
Support Mail: support@armdevs.com Sales Phone: +86-755-29638421


CoreWind Online Chat>
Work time: 09:00-18:00
Copyright @ 2014 to 2020 - CoreWind Tech.