Comments (7)
@LarryEitel Can you run npm run build
and then run npm start
. Then you can access http://localhost:3000
instead of 3001
.
Let me know if that helps.
from reactgo.
I hacked package.json
to accommodate setting environment variables in Windows:
"start": "set NODE_ENV=production && node server/index.js",
"dev": "set NODE_ENV=development && npm run buildDev && node server/index.js",
It works now. Can't think of an elegant way to accommodate linux AND windows for setting environment variables in one line.
I am very happy to get you project running locally. Thank you for sharing!! :)
Do you intend to maintain this project along with your reap version? I am working with MySql so I will be exploring that project for ideas. :)
from reactgo.
Moving on... I now run npm run watch / watchDev
. Everything seems to initialize however nothing renders when I hit http://localhost:3000/
.
This may be informative:
npm run watch
> [email protected] watch F:\_vms\HomesteadCode\xapp
> webpack --watch --progress --config ./webpack/webpack.config.js
69% 220/222 builHash: 8256dd13e9508875fafa
Version: webpack 1.11.0
Time: 4957ms
Asset Size Chunks Chunk Names
3f1998aca65909c0bd077ca705e7d25c.png 6.88 kB [emitted]
ddaf6d6ec871786ec6ee85b2869447b0.png 5.68 kB [emitted]
751390a95ba609212014ff3c73ebf976.png 5.38 kB [emitted]
app.server.js 88.3 kB 0 [emitted] app
header.server.js 8.65 kB 1 [emitted] header
styles/main.css 4.86 kB 0 [emitted] app
+ 52 hidden modules
Child extract-text-webpack-plugin:
+ 2 hidden modules
Child extract-text-webpack-plugin:
+ 2 hidden modules
Child extract-text-webpack-plugin:
+ 2 hidden modules
Child extract-text-webpack-plugin:
+ 2 hidden modules
Child extract-text-webpack-plugin:
+ 2 hidden modules
Child extract-text-webpack-plugin:
+ 2 hidden modules
Child extract-text-webpack-plugin:
+ 2 hidden modules
Hash: e5a16b858b9f9794b4b1
Version: webpack 1.11.0
Time: 6327ms
Asset Size Chunks Chunk Names
app.js 1.27 MB 0 [emitted] app
styles/main.css 4.9 kB 0 [emitted] app
app.js.map 1.49 MB 0 [emitted] app
styles/main.css.map 12.2 kB 0 [emitted] app
+ 251 hidden modules
Child extract-text-webpack-plugin:
+ 2 hidden modules
Child extract-text-webpack-plugin:
+ 2 hidden modules
Child extract-text-webpack-plugin:
+ 2 hidden modules
Child extract-text-webpack-plugin:
+ 2 hidden modules
Child extract-text-webpack-plugin:
+ 2 hidden modules
Child extract-text-webpack-plugin:
+ 2 hidden modules
Child extract-text-webpack-plugin:
+ 2 hidden modules
Chrome Network
tab showed failed attempt to load localhost
.
from reactgo.
I am very happy to get you project running locally. Thank you for sharing!! :)
That made my day! Thanks! :)
Do you intend to maintain this project along with your reap version? I am working with MySql so I will be exploring that project for ideas. :)
I will be maintaining this project actively in my spare time. The reap version was more of a proof-of-concept for working with Postgresql. :)
Everything seems to initialize however nothing renders when I hit http://localhost:3000/
If you run npm run watch
, you will still need to have another tab open running npm start
for the server to start. npm run watch
recompiles on any file changes, but does not restart the server.
If you want to try making changes with live reloads, you can just run npm run dev
which starts the server and reloads your components as you save.
from reactgo.
@choonkending SO CLOSE!!! In one tab I run npm run watchDev
and another I run npm run dev
. I hit http://localhost:3000/
and BADA BANG it works!!! However, when I make a change to code, although both tabs refresh/rerun their stuff, BADA BOOM!!!. Even if/when I manually refresh or it refreshes with LiveReload
, the change is not reflected in the browse UNLESS I rerun npm run dev
.
As you can imagine, that would be a very painful workflo... Kinda like the days when you had to recompile everything everytime you wanted to try something.
If you don't work on Windows, I can appreciate where this falls on your list of priorities.
Question: Is there any reason why this won't work on Windows? If it should work, I will run with any ideas/suggestions to work this out. Perhaps someone else tuning in may have an observation.
Thanks again. :)
from reactgo.
Ok, got things to a workable state using gulp and LiveReload. Used this tutorial: Tutorial – How to use Livereload with Nodemon in Gulp to Automatically Reload your Browser and Restart your App
I ran: npm install --save-dev gulp gulp-livereload gulp-notify gulp-nodemon express
(express can be excluded)
Here's my adapted gulpfile.js file:
// Dependencies
var gulp = require('gulp');
var nodemon = require('gulp-nodemon');
var notify = require('gulp-notify');
var livereload = require('gulp-livereload');
// Task
gulp.task('default', function() {
// listen for changes
livereload.listen();
// configure nodemon
nodemon({
// the script to run the app
script: 'server/index.js',
ext: 'js'
}).on('restart', function(){
// when the app has restarted, run livereload.
gulp.src('server/index.js')
.pipe(livereload())
.pipe(notify('Reloading page, please wait...'));
})
})
So with LiveReload watching my app
AND public
directory and enabled, in one tab I run npm run watch
and in another tab I run gulp
. Browse to localhost:3000
. Make a change to code like in app/base.html
, save and watch browser reload with change reflected.
This is in production mode. So next will be to try in dev mode to get sourceMaps.
from reactgo.
@LarryEitel Sorry it took months (literally) to get back on this. Let me know if you still need help with the current version of the repo. Closing for now. :)
from reactgo.
Related Issues (20)
- webpack config file preload all different environment configs.
- Failed to serialize user into session when using MYSQL with Node and Passport. URGENT
- Easy deployment question HOT 4
- Postgres DB on port other than 5432 HOT 2
- New release / update changelog and publish to npm
- Remove usage of css @apply HOT 2
- Consider bundle size limits for vendor packages
- Close / Update old / rotten PRs
- Update all npm packages HOT 2
- Please re-install nodemon HOT 1
- Use hooks HOT 2
- Consider using easy-peasy on top of Redux HOT 1
- Do not bundle server application (Using Node.JS v. 9 with modules support) HOT 1
- [QUESTION] Where I can find the CI service? HOT 2
- Signup error when using CORS HOT 2
- Introducing immer
- Introducting TypeScript
- postcss-cssnext deprecated HOT 1
- Use react-router v5
- leadme 한글 공식문서 링크
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from reactgo.