This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://facebook.github.io/react-native/docs/getting-started - REACT NATIVE | |
https://expo.io - EXPO | |
WINDOWS | |
Для разработки по ios (Только с помощью не нативного(родного) кода на EXPO) | |
- Необходимо создать проект | |
npm install -g create-react-native-app | |
create-react-native-app AwesomeProject | |
cd AwesomeProject | |
npm start |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://reactjs.org - офф сайт | |
https://learn-reactjs.ru/home - русская документация | |
https://metanit.com/web/react/ - русские уроки | |
https://www.npmjs.com/package/webpack - сборщик Webpack | |
https://github.com/babel/babel-loader - babel-loader | |
Варианты подключения: | |
- использование CDN | |
<script src="https://unpkg.com/react@16/umd/react.development.js"></script> | |
<script src="https://unpkg.com/react-dom@16/umd/react-dom.development.js"></script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http://expressjs.com/ru/ - express | |
https://socket.io - socket.io | |
https://www.npmjs.com/package/mysql - mysql | |
https://www.npmjs.com/package/multer - получние POST и загрузка файлов | |
https://www.npmjs.com/package/express-session - работа с SESSION(необходим дополнительный модуль- хранилище сеансов express-mysql-session(для mysql)) | |
https://www.npmjs.com/package/connect-redis - хранилище сеансов REDIS | |
https://www.npmjs.com/package/cookie-parser - работа с COOKIE | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//https://www.npmjs.com | |
//npm уже встроен в node | |
//npm init -> packege.json | |
//npm adduser - залогиниться | |
//npm publish - опубликовать | |
//npm install {} - установка модуля | |
//npm update - проверка на обновление | |
//npm install - установит все пакеты из packege.json | |
//в packege.json каждого модуля описанные подробности модуля, | |
//dependencies - необходимые модули |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://nodejs.org/en/download/ - скачать nodeJS и пакетный менеджер npm | |
console.log(__dirname);//путь к директории | |
console.log(__filename);//путь к файлу | |
const test = require('./array_module'); //подключение файлов | |
//ФАЙЛ array_module.js | |
array_counter = function (array) { | |
return array.length; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
использовать: | |
<script crossorigin src="https://unpkg.com/react@16/umd/react.production.min.js"></script> | |
<script crossorigin src="https://unpkg.com/react-dom@16/umd/react-dom.production.min.js"></script> | |
<script src="app.js"></script> | |
app.js - файл скомпилированный с помощью babel-cli | |
Babel из коробки ничего не делает, надо использовать плагины, для реботы с react -> babel-preset-react | |
./node_modules/.bin/babel src -d lib //компилирует папку |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1)Регаемся на сайте | |
2)Должен стоять Git | |
3)Должен стоять Heroku (Использование команды Heroku в консоли) - https://devcenter.heroku.com/articles/getting-started-with-nodejs#set-up | |
!!!При развертывании приложение на Heroku автоматически выполняется команда npm install и устанавливаются все зависимости, поэтому node-modules папка не обязательно транспортировать | |
4)В папке с проектом: | |
heroku login - Авторизируемся в Heroku | |
git init - Создание нового репозитория | |
git add -A - Подготовка всех файлов в директории | |
git commit -m "initial commit" - Коммит(фиксация изменений) | |
heroku create [--ssh-git] - Создает приложение на Heroku, которое подготовит Heroku к получению исходного кода. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
//------------------- | |
//загрузка файлов на сервер | |
// | |
if (isset($_POST['upload'])) { | |
echo "<pre>"; | |
print_r ($_FILES); | |
echo "</pre>"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? | |
/** | |
//---------- | |
//Используем команду composer install для установки monolog для ведения логов | |
//для этого создаем файл composer.json, в консоли переходим в нашу папку и выполняем команду composer install | |
//либо командой composer require monolog/monolog | |
require_once 'vendor/autoload.php'; | |
use Monolog\Logger; | |
use Monolog\Handler\StreamHandler; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
//Индексы в mySql используются для более быстрой обработки данных | |
//double(10,2) - 10 цифр до точки и 2 цифры после точки | |
//для ip использовать bigint(20) В поле типа unsigned int. Функция преобразования inet_aton(). Обратное преобразование inet_ntoa(). | |
//----------- | |
//для работы с mysqli см 9.6 - 9.10 | |
//Подключение к БД | |
*/ | |
define('DB_HOST', 'localhost'); |