Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hezhii/cross-domain-example
A example of the CORS on Node.js
https://github.com/hezhii/cross-domain-example
cors nodejs
Last synced: 14 days ago
JSON representation
A example of the CORS on Node.js
- Host: GitHub
- URL: https://github.com/hezhii/cross-domain-example
- Owner: hezhii
- Created: 2017-09-07T11:24:38.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-09-07T11:26:15.000Z (over 7 years ago)
- Last Synced: 2024-04-14T12:31:52.352Z (10 months ago)
- Topics: cors, nodejs
- Language: HTML
- Homepage:
- Size: 4.88 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Nodes.js 跨域
利用 CORS 实现的一个跨域的例子。
## 如何运行
将仓库克隆到本地,并安装需要的依赖,然后启动服务即可。
```bash
$ git clone https://github.com/hezhii/cross-domain-example.git
$ cd cross-domain-example
$ npm install
$ npm start
```启动服务后访问:`localhost:8081`。在页面上分别点击三个按钮可以测试 GET、POST 跨域以及跨域不成功的情况。