We need to generate secret key for development environment.
mix phoenix.gen.secret
# ednkXywWll1d2svDEpbA39R5kfkc9l96j0+u7A8MgKM+pbwbeDsuYB8MP2WUW1hf
Let's generate User model and controller.
## Install NGINX | |
$ sudo yum install nginx -y | |
## Install PHP and PHP-FPM | |
$ sudo yum install php -y | |
$ sudo yum install php-fpm -y | |
## Configure NGINX (see below) | |
$ sudo nano /etc/nginx/conf.d/default.conf |
import { convertFromRaw, convertToRaw, ContentState } from 'draft-js'; | |
const getIndicesOf = (searchStr, str, caseSensitive) => { | |
let tempStr = str; | |
let tempSearchStr = searchStr; | |
const searchStrLen = tempSearchStr.length; | |
if (searchStrLen === 0) { | |
return []; | |
} | |
let startIndex = 0; |