diff --git a/.gitignore b/.gitignore index 62803556..417ddcd4 100644 --- a/.gitignore +++ b/.gitignore @@ -21,11 +21,11 @@ build/Release # Dependency directories node_modules bower_components -server/vendor +api/vendor # Build files build -server/composer.lock +api/composer.lock .idea .jshintrc diff --git a/README.md b/README.md index 1c8c086b..3e3d5131 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ OpenSupports v4.0 -[](https://codeship.com/projects/124436/) +[](https://codeship.com/projects/124436/) ============ ### Getting up and running FRONT-END @@ -13,23 +13,20 @@ OpenSupports v4.0 3. Install npm `sudo apt-get install npm` 4. Install gulp `sudo npm install -g gulp` 5. Go to repo `cd os4-react` -6. Install dependences `sudo npm install` -7. Rebuild node-sass `sudo npm rebuild node-sass` +6. Install dependences `npm install` +7. Rebuild node-sass `npm rebuild node-sass` 8. Run `gulp dev` 9. Go to the main app: `http://localhost:3000/app` or the component demo `http://localhost:3000/demo` - -### Getting up and running - -1. [Create MySQL Database](#markdown-header-create-mysql-database) -2. Clone this repo -3. Run `npm install` from the root directory -4. Create a mysql database -5. Run `gulp dev` (may require installing Gulp globally `npm install gulp -g`) -6. Your browser will automatically be opened and directed to the browser-sync proxy address -7. 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 use `gulp dev` during development. More information below) +10. Your browser will automatically be opened and directed to the browser-sync proxy address 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. +### Getting up and running BACK-END + +1. Clone this repo +2. [Create MySQL Database](#markdown-header-create-mysql-database) +TODO + ### Create MySQL Database 1. Install mysql-server @@ -37,13 +34,13 @@ Now that `gulp dev` is running, the server is up as well and serving files from Ubuntu `sudo apt-get install mysql-server` - + Cent OS `sudo yum install mysql-server` `/etc/init.d/mysqld start` -2. Access the mysql shell +2. Access the mysql shell `mysql -u root -p` @@ -63,4 +60,4 @@ Now that `gulp dev` is running, the server is up as well and serving files from 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. \ No newline at end of file +**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. diff --git a/server/composer.json b/api/composer.json similarity index 100% rename from server/composer.json rename to api/composer.json diff --git a/server/config.php b/api/config.php similarity index 100% rename from server/config.php rename to api/config.php diff --git a/server/controllers/user.php b/api/controllers/user.php similarity index 100% rename from server/controllers/user.php rename to api/controllers/user.php diff --git a/server/index.php b/api/index.php similarity index 100% rename from server/index.php rename to api/index.php diff --git a/server/libs/Controller.php b/api/libs/Controller.php similarity index 100% rename from server/libs/Controller.php rename to api/libs/Controller.php diff --git a/server/models/DataStore.php b/api/models/DataStore.php similarity index 100% rename from server/models/DataStore.php rename to api/models/DataStore.php diff --git a/server/models/ERRORS.php b/api/models/ERRORS.php similarity index 100% rename from server/models/ERRORS.php rename to api/models/ERRORS.php diff --git a/server/models/Response.php b/api/models/Response.php similarity index 100% rename from server/models/Response.php rename to api/models/Response.php diff --git a/server/models/Session.php b/api/models/Session.php similarity index 100% rename from server/models/Session.php rename to api/models/Session.php diff --git a/server/models/User.php b/api/models/User.php similarity index 100% rename from server/models/User.php rename to api/models/User.php diff --git a/server/tests/__lib__/Mock.php b/api/tests/__lib__/Mock.php similarity index 100% rename from server/tests/__lib__/Mock.php rename to api/tests/__lib__/Mock.php diff --git a/server/tests/__mocks__/RedBeanMock.php b/api/tests/__mocks__/RedBeanMock.php similarity index 100% rename from server/tests/__mocks__/RedBeanMock.php rename to api/tests/__mocks__/RedBeanMock.php diff --git a/server/tests/__mocks__/SlimMock.php b/api/tests/__mocks__/SlimMock.php similarity index 100% rename from server/tests/__mocks__/SlimMock.php rename to api/tests/__mocks__/SlimMock.php diff --git a/app/fonts/.gitkeep b/api/tests/controllers/.gitkeep similarity index 100% rename from app/fonts/.gitkeep rename to api/tests/controllers/.gitkeep diff --git a/app/images/.gitkeep b/api/tests/lib/.gitkeep similarity index 100% rename from app/images/.gitkeep rename to api/tests/lib/.gitkeep diff --git a/server/tests/models/DataStoreTest.php b/api/tests/models/DataStoreTest.php similarity index 100% rename from server/tests/models/DataStoreTest.php rename to api/tests/models/DataStoreTest.php diff --git a/server/tests/models/ResponseTest.php b/api/tests/models/ResponseTest.php similarity index 100% rename from server/tests/models/ResponseTest.php rename to api/tests/models/ResponseTest.php diff --git a/app/index.html b/app/index.html deleted file mode 100644 index 6aff3455..00000000 --- a/app/index.html +++ /dev/null @@ -1,20 +0,0 @@ - - -
- - - - - -