Repository for responsive, realtime apps
Check the Demo here https://realtime.septa.org/ or https://rttest.septa.org/
> npm install -g npm
> npm install -g node
> npm -v
> node -v
> npm rebuild
This command runs the npm build command on the matched folders. This is useful when you install a new version of node, and must recompile all your C++ addons with the new binary.
There are two methods for getting started with this repo.
Checkout this repo, install dependencies, then start the process with the following:
> git clone https://github.com/czsyjss/SEPTA.git
> cd SEPTA
> npm install
> npm run <serve/build>
Click here then download the .zip file. Extract the contents of the zip file, then open your terminal, change to the project directory, and:
> npm install
> npm run serve <serve/build>
Adding the hidden file .babelrc to the project directory before npm run serve <serve/build>
{
"presets": ["react","babel-preset-env"]
}
Runs the app in the development mode.
Open http://localhost:8080 to view it in the browser.
The page will reload if you make edits.
You will also see any lint errors in the console.
Install nohup, then start the process with the following:
> npm install nohup
> sudo nohup npm run serve</dev/null &> /dev/null &
Open the terminal, then change to the project directory, and:
> ps -ef
> kill -9 <PID>
In package.json file
"scripts": {
"serve": "webpack-dev-server",
...
}
"scripts": {
"serve": "webpack-dev-server --inline --host <hostname/ip> --port <number>",
...
}
Open the terminal, then change to the project directory, and:
> npm uninstall webpack-dev-server
> npm install --save-dev webpack-dev-server@2.7.1
Builds the app for production to the dist
folder.
It correctly bundles React in production mode and optimizes the build for the best performance.
The build is minified and the filenames include the hashes.
Your app is ready to be deployed!
change your .htaccess and insert this:
Options -MultiViews
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.html [QSA,L]
or change your httpd.conf and insert this:
<VirtualHost *:port>
ServerName xxx
DocumentRoot /var/www/html/xxx
<Directory "/var/www/html/xxx
...
RewriteEngine on
# Don't rewrite files or directories
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
# Rewrite everything else to index.html to allow html5 state links
RewriteRule ^ index.html [L]
</Directory>
</VirtualHost>