Skip to content

SuminHan/CS360_tutorial

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CS360 Tutorial Server

Author: smhan@dbserver.kaist.ac.kr

This is a prototype code for new starters who will build their application based on

How to use?

First run the run_on_my.sql on mysql manually, or simply by

$ sudo mysql < run_on_my.sql

This will create database called cs360_tutorial and create table called user_tbl while creating new user called 'tester'@'localhost' with password '1234'.

Then, install the node modules:

$ npm install

Now, run the server.

$ node app.js
Example app listening on port 3000!

Checkout your http://localhost:3000/.

Basic functions

  • localhost:3000/: sends "index.html" which includes submit form.
  • localhost:3000/listAPI: sends raw json format data from "select * from user_tbl"
  • localhost:3000/listPretty: give into list using JQuery ajax. check javascript code.

About

Basic Node.js + Express.js + MySQL for starters

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published