SCMP 318 – Name Web Program on Server

Goal

To get the name web program working on the class server

Method

You can choose either the C++ version or the Python version, which ever you plan to do your programming with on the first lab.

C++

Steps:

1. Use git to clone the project on you server:

git clone https://github.com/jimskon/NameLookup.git"

2. Edit the files to make the project work for you (instead of “skon”)

Edit “Makefile”. Change “user=skon” to “user=yourusername

Edit “namelookup.js”. Near the bottom change:

    url: '/cgi-bin/skon_namelookup.cgi?name='+searchStr+'&type_select='+searchType, 

to

    url: '/cgi-bin/yourusername_namelookup.cgi?name='+searchStr+'&type_select='+searchType, 

3. Create the directories for your project in the web directory, and make yourself own these folders (change “skon” to your username):

mkdir /var/www/html/class/softdev/yourusername/Names               # Folder for all your projects 

4. Make the project:

make

5. Go to the application and test it out! (Use your server ip address)

http://jimskon.com/class/softdev/yourusername/Names/namelookup.html

Python

1. Clone the project:

git clone https://github.com/jimskon/PythonNameLookup.git

2. Create the directories for your project in the web directory, and make yourself own these folders (change “skon” to your username):

mkdir /var/www/html/classsoftdev/youusername/pNames   # Folder for this project 

3. Edit the files to make the project work for you (instead of “skon”)

Edit “Makefile”. Change “user=skon” to “user=yourusername

Edit “namelookup.js”. Near the bottom change:

    url: '/cgi-bin/skon_namelookup.py?name='+searchStr+'&type_select='+searchType, 

to

    url: '/cgi-bin/yourusername_namelookup.py?name='+searchStr+'&type_select='+searchType, 

Type "make" to copy the files to the web folder you created:
make
4. Try it out: http://jimskon.com/class/softdev/yourusername/pNames/namelookup.html

Turn in:

  • A screen shot of your working program
  • A write up explaining how you work proceeded, and any problems you ran into.

View Page

Scroll to Top