This focuses on generating the certificates for loading local virtual hosts hosted on your computer, for development only.
Do not use self-signed certificates in production ! For online certificates, use Let's Encrypt instead (tutorial).
| type CamelCase<S extends string> = S extends `${infer P1}_${infer P2}${infer P3}` | |
| ? `${Lowercase<P1>}${Uppercase<P2>}${CamelCase<P3>}` | |
| : Lowercase<S> | |
| type KeysToCamelCase<T> = { | |
| [K in keyof T as CamelCase<string & K>]: T[K] | |
| } | |
| type CamelToSnakeCase<S extends string> = S extends `${infer T}${infer U}` ? |
| const crypto = require('crypto'); | |
| const { promisify } = require('util'); | |
| const express = require('express'); | |
| const asyncify = require('express-asyncify'); | |
| const session = require('express-session'); | |
| const createFileStore = require('session-file-store'); | |
| const nodemailer = require('nodemailer'); | |
| const nodemailerSendgrid = require('nodemailer-sendgrid'); | |
| const bodyParser = require('body-parser'); | |
| const pass = require('passport'); |
This focuses on generating the certificates for loading local virtual hosts hosted on your computer, for development only.
Do not use self-signed certificates in production ! For online certificates, use Let's Encrypt instead (tutorial).
| <IfModule mod_rewrite.c> | |
| RewriteEngine On | |
| RewriteBase / | |
| #Removes access to the system folder by users. | |
| #Additionally this will allow you to create a System.php controller, | |
| #previously this would not have been possible. | |
| #'system' can be replaced if you have renamed your system folder. | |
| RewriteCond %{REQUEST_URI} ^system.* | |
| RewriteRule ^(.*)$ /index.php?/$1 [L] |
| <?php | |
| include '../vendor/autoload.php'; | |
| $classLoader = new \Doctrine\Common\ClassLoader('Entities', __DIR__); | |
| $classLoader->register(); | |
| $classLoader = new \Doctrine\Common\ClassLoader('Proxies', __DIR__); | |
| $classLoader->register(); | |
| // config | |
| $config = new \Doctrine\ORM\Configuration(); |