This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | // read .env to get config in node.js express | |
| const path = require('path'); | |
| const dotEnv = require('dotenv'); | |
| // read .env | |
| dotEnv.config(); | |
| // export module | |
| module.exports = { | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | FROM mysql:8 | |
| ENV MYSQL_ROOT_PASSWORD=password | |
| ## 建立完 docker image後記得將 initialize.sql 掛載到 /docker-entrypoint-initdb.d | |
| ## 記得在docker 將 init.sql, users.sql, dummy.sql 掛載到容器的 /opt/sql/ | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | DROP table IF EXISTS todo; | |
| CREATE TABLE todo ( | |
| todo_id varchar(36) primary key, | |
| title varchar(20) default 'unKnown', | |
| description varchar(255) , | |
| start_date date not null, | |
| due_date date not null, | |
| finished boolean default 'f' | |
| ); | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | Insert into todo (todo_id,title,description,start_date,due_date,finished) values ('c4b45418-2a8c-48f7-aea9-b3f0bbc31138','unknown','unknown description','2020-10-05','2020-10-07','f'); | |
| Insert into todo (todo_id,title,description,start_date,due_date,finished) values ('ec36ef4a-6ec5-401e-a18f-a140c917dac1','unknown1','unknown description1','2020-10-05','2020-10-07','f'); | |
| Insert into todo (todo_id,title,description,start_date,due_date,finished) values ('d323a41b-8149-43c7-bc59-13cafbc3548f','unknown2','unknown description2','2020-10-05','2020-10-07','f'); | |
| Insert into todo (todo_id,title,description,start_date,due_date,finished) values ('234420a9-0e0d-4fe6-833e-0e2f32711a97','unknown3','unknown description3','2020-10-05','2020-10-07','f'); | |
| Insert into todo (todo_id,title,description,start_date,due_date,finished) values ('2d281ecf-1d99-4bd2-b716-e6513cb113eb','unknown4','unknown description4','2020-10-05','2020-10-07','f'); | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | @Entity | |
| public class TestEntity{ | |
| @Id | |
| @GeneratedValue(generator = "uuid") | |
| @GenericGenerator(name="uuid",strategy = "uuid") | |
| private String uuid; | |
| private String testItem; | |
| } | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | // ajaxBean | |
| public class AjaxBean{ | |
| private String item1; | |
| private String item2; | |
| private Integer item3; | |
| } |