PiZilla is built entirely using Express and ReactJS. Transpiled using Babel with Webpack3 and Hot Module Reloading. For a full list of dependencies, refer here.
The codebase holds EcmaScript 2016 syntax along with extensions for transform-runtime, transform-class-properties and transform-object-rest-spread operators.
- Install all dependencies with
npm install
oryarn
(if you use yarn). - To run the server for development on localhost, use
npm run dev
oryarn dev
. (includes support for live reload) - Build the react application with
npm run build
oryarn build
. - Configure your backend server accordingly at server/config.js.
const config = {
deadline: 24, // hours beyond which a file is deleted
deleteSchedule: '00 00 */2 * * *', // runs the check once every two hours
port: 80, // configure your server port number
root: path.dirname(__dirname), // the root directory of application
uploads: 'uploads' // the location where uploads are to be saved
};
- Start the Express server with
npm start
oryarn start
.
Note: Make sure you have write access to the uploads folder. ππ»