Giter Club home page Giter Club logo

1dv610-l2's Introduction

1DV610

My solution for 1DV610. It fulfills 100% of the automatic tests.

It is a todo app and you can find it here: 1dv610.antonstrand.se

Use cases

All use cases are implemented.

  1. UC1 Add a todo item
  2. UC2 List todos
  3. UC3 Complete a todo

Test cases

All tests are successful.

  1. Test for Use case 1
  2. Test for Use case 2
  3. Test for Use case 2

How to get started

This guide assumes that you know how to set up a php project and will only get into specifics to this project.

1. Create database

First, create a database and add a table for users, cookies and todos. You can use the SQL snippets below to speed up this process.

SQL for creating users table

CREATE TABLE `users` (
  `id` int(11) NOT NULL,
  `username` varchar(128) NOT NULL,
  `password` text NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

SQL for creating cookies table

CREATE TABLE `cookies` (
  `id` int(11) NOT NULL,
  `username` varchar(128) NOT NULL UNIQUE,
  `password` text NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

SQL for creating todos table

CREATE TABLE `todos` (
  `id` int(11) NOT NULL PRIMARY KEY AUTO_INCREMENT,
  `username` varchar(128) NOT NULL,
  `task` text NOT NULL,
  `isComplete` tinyint(1) DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

2. Create a Settings.php

Create a Settings.php in the root folder. Use the template below and change the information to fit your setup.

<?php
class Settings
{
    public static $HOST = 'localhost';
    public static $USER = 'user';
    public static $PASSWORD = 'password';
    public static $DB = 'dbName';
}

1dv610-l2's People

Contributors

antonstrand avatar

Stargazers

 avatar

Watchers

 avatar  avatar

1dv610-l2's Issues

Catch 404

Either redirect to index or present a 404 error page

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.