b2c66113df
[Max Red] - Modify dropdown focus behaviour |
||
---|---|---|
app | ||
gulp | ||
server | ||
src | ||
.gitignore | ||
LICENSE | ||
README.md | ||
database.sh | ||
gulpfile.js | ||
package.json | ||
preprocessor.js |
README.md
OpenSupports v4.0
Getting up and running FRONT-END
- update
sudo apt-get update
- Clone this repo
- Install node 4.x version
sudo apt-get install curl
curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash -
sudo apt-get install -y nodejs
- Install npm
sudo apt-get install npm
- Install gulp
sudo npm install -g gulp
- Go to repo
cd os4-react
- Install dependences
sudo npm install
- Rebuild node-sass
sudo npm rebuild node-sass
- Run
gulp dev
- Go to the main app:
http://localhost:3000/app
or the component demohttp://localhost:3000/demo
Getting up and running
- Create MySQL Database
- Clone this repo
- Run
npm install
from the root directory - Create a mysql database
- Run
gulp dev
(may require installing Gulp globallynpm install gulp -g
) - Your browser will automatically be opened and directed to the browser-sync proxy address
- To prepare assets for production, run the
gulp prod
task (Note: the production task does not fire up the express server, and won't provide you with browser-sync's live reloading. Simply usegulp dev
during development. More information below)
Now that gulp dev
is running, the server is up as well and serving files from the /build
directory. Any changes in the /src
directory will be automatically processed by Gulp and the changes will be injected to any open browsers pointed at the proxy address.
Create MySQL Database
-
Install mysql-server
Ubuntu
sudo apt-get install mysql-server
Cent OS
sudo yum install mysql-server
/etc/init.d/mysqld start
-
Access the mysql shell
mysql -u root -p
-
Create a new database
CREATE DATABASE os_dev;
-
Assign privileges to user
GRANT ALL PRIVILEGES ON os_dev.* To 'os_dev'@'localhost' IDENTIFIED BY 'os_dev';
-
Run the MySQL server
sudo /etc/init.d/mysql start
Production Task
Just as there is the gulp dev
task for development, there is also a gulp prod
task for putting your project into a production-ready state. This will run each of the tasks, while also adding the image minification task discussed above. There is also an empty gulp deploy
task that is included when running the production task. This deploy task can be fleshed out to automatically push your production-ready site to your hosting setup.
Reminder: When running the production task, gulp will not fire up the express server and serve your index.html. This task is designed to be run before the deploy
step that may copy the files from /build
to a production web server.