Commit c1dab4f9 authored by Gudipaty Aniket's avatar Gudipaty Aniket

Modified README

parent 98d17d44
# Temp
## Introduction
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 10.1.6.
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 10.1.6. It is expected to be run along with with [XAMPP](https://www.apachefriends.org/download.html) on a linux (Ubuntu) computer.
This project has mainly 3 kind of code files : Angular code files (for frontend), PHP scripts (for backend) and MySQL script (for backend).
## Development server
## Clone Repository
Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.
After installing Angular CLI (version 10.1.6) and XAMPP on your linux computer, clone/save this [project repository/directory](https://git.cse.iitb.ac.in/ayushjangir/sfcode/) inside the `/opt/lampp/htdocs/` directory.
Make sure that you recursively change the permissions for the `sfcode/` directory (project directory) and its subdirectories (It is recommended that they be set to 777).
## Code scaffolding
## Set Up Backend
Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`.
Start the XAMPP servers by going into `/opt/lampp` directory and using the command `./xampp start` as a superuser.
## Build
Now, if you are using XAMPP for this project for the first time, the follow these steps:
1. Open your browser and go to the adress `http://localhost/phpmyadmin/` and create a MySQL database with name *ssl_database*.
2. Go into the created database and import the script present in `backend/database.sql` script from the project repository, which create two tables : *users* and *questions*.
Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `--prod` flag for a production build.
## Start Angular Server
## Running unit tests
Open a terminal in the project directory, `/opt/lampp/htdocs/sfcode`. Now, follow these steps:
Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).
1. Use `npm install`.
2. Use `ng build` to build the project.
3. Use `ng serve` to start angular server at `http://localhost:4200/`. If you wish to make the website to be available to your local network, use
```
ng serve --host local_ip --port port_no
```
Here, *local_ip* is your computer's local ip adress and *port_no* is the port number (default value 4200) at which the website will be hosted. Use the ip adress *0.0.0.0* to make it available from any network. Note that the XAMPP server is already running while you are following the above three steps. The XAMPP server can also be started after starting the angular server, using `./xampp start` command in the `/opt/lampp/` directory.
## Running end-to-end tests
Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/).
## Further help
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md).
Now, you can open the website on your browser and the default Registration/Login page will open.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment