Slog101_Front-end development using React framework12
ArthurSlog
SLog-101
Year·1
Guangzhou·China
October 24th 2018
Personal website: http://www.arthurslog.com
CSDN:https://blog.csdn.net/u010997452/article/list/1
GitHub:https://github.com/BlessedChild/ArthurSlog
NPM:https://www.npmjs.com/~arthurslog
dig for gold:https://juejin.im/user/59f2a424f265da432f305c66/posts
sketchbook:https://www.jianshu.com/u/b9ebe10f0534
segmentfault:https://segmentfault.com/u/arthurslog/articles
One moment at a time, one game at a time. We need to see what the wind is doing.
Development Environment MacOS (Mojave 10.14 (18A391))
information source
require: https://nodejs.org/docs/latest-v8.x/api/modules.html#modules_require
module: https://nodejs.org/docs/latest-v8.x/api/modules.html#modules_module
export: https://nodejs.org/docs/latest-v8.x/api/modules.html#modules_exports
path: https://www.npmjs.com/package/path
Start coding
The back-end development specifications and engineering structure were defined.
Create an object config in the main.js file as a configuration file for the entire project
To keep things as neat as possible, no separate global configuration file is used
And all other files just bring in the config object in the main.js file
The specific code is as follows.
server/main.js
Readjusted the reference path
Tested. Back end is working.
The project files have been uploaded to Github: https://github.com/BlessedChild/ArthurSlogStore
The project is in continuous development. The logs can't keep up with the pace of development.
There are partial annotations in the comments of the source code
As you can see from the source code comments, the development process is a trade-off between implementation and time
Spending more time up front to get the development specs right will be much less expensive to maintain and expand later on
But it costs a lot of money in pre-development.
So there's a trade-off between business needs and revenue expectations
At this point, a tentative back-end development specification has been developed and the project structure has been adjusted accordingly.
If you like my post, feel free to like it and leave a comment.
thanks