-
Sibidharan authoredSibidharan authored
To learn more about this project, read the wiki.
README.md 3.70 KiB
API Development Course by LAHTP
To get started, clone this repository to a proper document root. For XAMPP, this is htdocs
. For private apache setup, its upto you how you configure.
This code is right now deployed at: https://api1.selfmade.ninja
API Documentation for the development can be found at the Wiki Section of this repo.
Thanks to Manickam Venkatachalam for making the API documentation happen.
Right outside the document root, create a file called env.json
and keep the contents of the file similar to the following.
{
"database": "apis",
"username": "root",
"password": "password",
"server": "localhost",
"email_api_key": "Your_Sendgrid_Key"
}
This will be called by the API functions to get the database connection.
This project is under development.
Virtual Host Apache Configuration:
<VirtualHost *:80>
ServerAdmin hello@sibidharan.me
DocumentRoot "/var/www/api-development-course-apr-2021"
ServerName api1.selfmade.ninja
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
<Directory "/var/www/api-development-course-apr-2021">
Options Indexes FollowSymLinks ExecCGI Includes
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
In the above configuration, env.json
should sit exactly /var/www/env.json
here.
Configuring your own Ubuntu Setup
- Update and upgrade the system first.
$ sudo apt update && sudo apt -y upgrade
- Install Apache, MySQL and PHP
$ sudo apt install apache2 libapache2-mod-php mysql-server php-mysql
- Secure MySQL Database
$ sudo mysql_secure_installation