This is a simple SPA for cakes! It is an application, where people can post pictures of their cakes along with name, comment and yum factor and share it with others. The application is build using ReactJS.
In order to develop/run this project, you will need. NodeJS version v8.9.1
. nvm can be used in order to install node and npm.
For the installation of the project follow these steps:
- Clone the repository locally
git clone https://github.com/dirchev/cake-app
- Enter project directory
On Linux
cd cake-app
- Install dependencies
npm install
- You are good to go!
There are various commands, that help developing the application.
npm start
Runs a simple server, serving the needed files to localhost:3000
. It also watches for changes in all required js
and scss
files and in case of change refreshes the app.
In order to build production ready bundles:
For js bundle
npm run build-js
For css bundle
npm run build-css
For both
npm run build
There are no tests implemented atm, but in case test env has to be used, run:
npm run test
This executes jest CLI, which watches for test files and runs tests when a file changes. (it also has different functionality to run all tests, only failed, etc.)
There is really no deploy script, as a heroku is set up to deploy the application on push to master
. However, in order to deploy this application somewhere else, all is needed to do is
npm run build # builds a full set of files in the /build dir
and then all of the files have to be served by a server, where if a file does not exists, the index.html
file must be returned (this way the routing of the SPA is handled properly).