2019102152 김다빈

Set frame

1 +
2 +# Created by https://www.toptal.com/developers/gitignore/api/node
3 +# Edit at https://www.toptal.com/developers/gitignore?templates=node
4 +
5 +### Node ###
6 +# Logs
7 +logs
8 +*.log
9 +npm-debug.log*
10 +yarn-debug.log*
11 +yarn-error.log*
12 +lerna-debug.log*
13 +.pnpm-debug.log*
14 +
15 +# Diagnostic reports (https://nodejs.org/api/report.html)
16 +report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
17 +
18 +# Runtime data
19 +pids
20 +*.pid
21 +*.seed
22 +*.pid.lock
23 +
24 +# Directory for instrumented libs generated by jscoverage/JSCover
25 +lib-cov
26 +
27 +# Coverage directory used by tools like istanbul
28 +coverage
29 +*.lcov
30 +
31 +# nyc test coverage
32 +.nyc_output
33 +
34 +# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
35 +.grunt
36 +
37 +# Bower dependency directory (https://bower.io/)
38 +bower_components
39 +
40 +# node-waf configuration
41 +.lock-wscript
42 +
43 +# Compiled binary addons (https://nodejs.org/api/addons.html)
44 +build/Release
45 +
46 +# Dependency directories
47 +node_modules/
48 +jspm_packages/
49 +
50 +# Snowpack dependency directory (https://snowpack.dev/)
51 +web_modules/
52 +
53 +# TypeScript cache
54 +*.tsbuildinfo
55 +
56 +# Optional npm cache directory
57 +.npm
58 +
59 +# Optional eslint cache
60 +.eslintcache
61 +
62 +# Microbundle cache
63 +.rpt2_cache/
64 +.rts2_cache_cjs/
65 +.rts2_cache_es/
66 +.rts2_cache_umd/
67 +
68 +# Optional REPL history
69 +.node_repl_history
70 +
71 +# Output of 'npm pack'
72 +*.tgz
73 +
74 +# Yarn Integrity file
75 +.yarn-integrity
76 +
77 +# dotenv environment variables file
78 +.env
79 +.env.test
80 +.env.production
81 +
82 +# parcel-bundler cache (https://parceljs.org/)
83 +.cache
84 +.parcel-cache
85 +
86 +# Next.js build output
87 +.next
88 +out
89 +
90 +# Nuxt.js build / generate output
91 +.nuxt
92 +dist
93 +
94 +# Gatsby files
95 +.cache/
96 +# Comment in the public line in if your project uses Gatsby and not Next.js
97 +# https://nextjs.org/blog/next-9-1#public-directory-support
98 +# public
99 +
100 +# vuepress build output
101 +.vuepress/dist
102 +
103 +# Serverless directories
104 +.serverless/
105 +
106 +# FuseBox cache
107 +.fusebox/
108 +
109 +# DynamoDB Local files
110 +.dynamodb/
111 +
112 +# TernJS port file
113 +.tern-port
114 +
115 +# Stores VSCode versions used for testing VSCode extensions
116 +.vscode-test
117 +
118 +# yarn v2
119 +.yarn/cache
120 +.yarn/unplugged
121 +.yarn/build-state.yml
122 +.yarn/install-state.gz
123 +.pnp.*
124 +dev.js
125 +### Node Patch ###
126 +# Serverless Webpack directories
127 +.webpack/
128 +
129 +# End of https://www.toptal.com/developers/gitignore/api/node
...\ No newline at end of file ...\ No newline at end of file
1 +const fetch = (...args) => import('node-fetch').then(({ default: fetch }) => fetch(...args));
2 +const url = 'https://api.upbit.com/v1/market/all';
3 +const options = { method: 'GET', headers: { Accept: 'application/json' } };
4 +const express=require('express');
5 +const app=express();
6 +async function test() {
7 + let response= await fetch(url, options)
8 + .then(res => res.json())
9 + .then(json => {
10 + console.log(json);
11 + console.log(json.length);
12 + return json;
13 + })
14 + var hello=await (await fetch(url,options)).json();
15 + return hello;
16 +}
17 +
18 +app.get('/fetch_test',async (req,res)=>{
19 + res.json(await test());
20 +})
21 +app.listen(5000,()=>{
22 + console.log('server')
23 +})
...\ No newline at end of file ...\ No newline at end of file
This diff could not be displayed because it is too large.
1 +{
2 + "name": "crypto_trade_bot",
3 + "version": "1.0.0",
4 + "description": "",
5 + "main": "index.js",
6 + "scripts": {
7 + "test": "echo \"Error: no test specified\" && exit 1"
8 + },
9 + "repository": {
10 + "type": "git",
11 + "url": "http://khuhub.khu.ac.kr/Crypto/Crypto_trade_bot.git"
12 + },
13 + "author": "",
14 + "license": "ISC",
15 + "dependencies": {
16 + "express": "^4.17.1",
17 + "node-fetch": "^3.0.0"
18 + },
19 + "devDependencies": {
20 + "nodemon": "^2.0.14"
21 + }
22 +}