Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ash-sc/online-reader
在线小说阅读器
https://github.com/ash-sc/online-reader
electron react
Last synced: about 2 months ago
JSON representation
在线小说阅读器
- Host: GitHub
- URL: https://github.com/ash-sc/online-reader
- Owner: Ash-sc
- Created: 2017-04-10T06:32:53.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2023-02-27T19:45:07.000Z (almost 2 years ago)
- Last Synced: 2024-04-15T15:12:15.661Z (10 months ago)
- Topics: electron, react
- Language: JavaScript
- Homepage:
- Size: 10.6 MB
- Stars: 22
- Watchers: 3
- Forks: 9
- Open Issues: 22
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 在线小说阅读
在线小说阅读器,前端使用React框架,后端使用Node.js(爬取http://www.snwx8.com/ 的小说内容)。
### 运行方式:
````
$ npm installl
$ npm run build
$ node .server/online-reader-app.js
````
浏览器输入:http://localhost:4396 查看
### 本地调试:
````
$ npm install
$ node ./webpack-dev-server.js
$ node ./app.js
````
修改代码后自动编译
浏览器输入:http://localhost:8999 查看
### 运行效果:
[http://web-site-files.ashshen.cc/gitHub/online-reader-preview.gif](http://web-site-files.ashshen.cc/gitHub/online-reader-preview.gif)
### electron:
electron可以将web网页打包成可在PC端运行的软件,[关于electron。](https://electron.atom.io/)
首先你需要切换分支到electron。
在本地运行electron: 你需要修改`./src/js/utils/api/api.js`中`API_ROOT`的值为`http://localhost:4396`。然后:
````
$ npm install
$ node ./app.js
$ npm start
````
即可。
编译打包electron:(使用[electron-packager](https://github.com/electron-userland/electron-packager)) 修改代码同上。
````
$ npm install
$ node ./app.js
(mac)$ npm run pack-mac
(win32)$ npm run pack-win32
(linux)$ npm run pack-linux
(all)$ npm run pack
````
打包后会在项目根目录下新出现一个文件夹,里面包含运行文件。