Ubuntu

update README.md

No preview for this file type
다음 우편번호 서비스 api를 통해 사용자로부터 주소를 작성하면 이를 영문주소로 변환해준다.
이때 아마존, 뉴에그, 알리익스프레스, 이베이, 페이팔 등에서 작성하는 영어주소 양식에 맞게 각각 출력하여 주소 작성에 용이하게 해준다.
추후에 해외직구 가격 비교기능을 추가하는 것도 괜찮을지도?
참고: http://postcode.map.daum.net/guide
<!--
*** Thanks for checking out this README Template. If you have a suggestion that would
*** make this better, please fork the repo and create a pull request or simply open
*** an issue with the tag "enhancement".
*** Thanks again! Now go create something AMAZING! :D
-->
<!-- PROJECT SHIELDS -->
<!--
*** I'm using markdown "reference style" links for readability.
*** Reference links are enclosed in brackets [ ] instead of parentheses ( ).
*** See the bottom of this document for the declaration of the reference variables
*** for contributors-url, forks-url, etc. This is an optional, concise syntax you may use.
*** https://www.markdownguide.org/basic-syntax/#reference-style-links
-->
[![Contributors][contributors-shield]][contributors-url]
[![Forks][forks-shield]][forks-url]
[![Stargazers][stars-shield]][stars-url]
[![Issues][issues-shield]][issues-url]
[![MIT License][license-shield]][license-url]
[![LinkedIn][linkedin-shield]][linkedin-url]
<!-- PROJECT LOGO -->
<br />
<p align="center">
<a href="https://github.com/othneildrew/Best-README-Template">
<img src="images/logo.png" alt="Logo" width="80" height="80">
</a>
<h3 align="center">Best-README-Template</h3>
<h3 align="center">Amazon_Shopping_Helper</h3>
<p align="center">
An awesome README template to jumpstart your projects!
해외직구가 처음인 사람에게 도움을!
<br />
<a href="https://github.com/othneildrew/Best-README-Template"><strong>Explore the docs »</strong></a>
<br />
<br />
<a href="https://github.com/othneildrew/Best-README-Template">View Demo</a>
·
<a href="https://github.com/othneildrew/Best-README-Template/issues">Report Bug</a>
·
<a href="https://github.com/othneildrew/Best-README-Template/issues">Request Feature</a>
</p>
</p>
<!-- TABLE OF CONTENTS -->
## Table of Contents
* [About the Project](#about-the-project)
* [Built With](#built-with)
* [Getting Started](#getting-started)
* [Prerequisites](#prerequisites)
* [Installation](#installation)
* [Usage](#usage)
* [Roadmap](#roadmap)
* [Contributing](#contributing)
* [License](#license)
* [Contact](#contact)
* [Acknowledgements](#acknowledgements)
<!-- ABOUT THE PROJECT -->
## About The Project
[![Product Name Screen Shot][product-screenshot]](https://example.com)
There are many great README templates available on GitHub, however, I didn't find one that really suit my needs so I created this enhanced one. I want to create a README template so amazing that it'll be the last one you ever need.
Here's why:
* Your time should be focused on creating something amazing. A project that solves a problem and helps others
* You shouldn't be doing the same tasks over and over like creating a README from scratch
* You should element DRY principles to the rest of your life :smile:
Of course, no one template will serve all projects since your needs may be different. So I'll be adding more in the near future. You may also suggest changes by forking this repo and creating a pull request or opening an issue.
* [About the Project](## 프로그램 설명)
* [Built With](## 프로그램 시연 주소)
* [Getting Started](## 프로그램 설치 방법)
* [Contributing](### 사전 준비물)
* [License](### 프로그램 실행)
* [Prerequisites](## 자기 평가)
* [License](## License)
* [Contact](## Contact)
* [Contact](## 참고사항)
A list of commonly used resources that I find helpful are listed in the acknowledgements.
## 프로그램 설명
### Built With
This section should list any major frameworks that you built your project using. Leave any add-ons/plugins for the acknowledgements section. Here are a few examples.
* [Bootstrap](https://getbootstrap.com)
* [JQuery](https://jquery.com)
* [Laravel](https://laravel.com)
해외직구가 처음인 사람에게 도움이 될 수 있는 프로그램을 목표로 구상되었다.
지금 현재 제작된 기능은 한국 주소를 입력하면 해외쇼핑몰의 주소 작성 양식에 맞게 영문주소를 반환한다.
<!-- GETTING STARTED -->
## Getting Started
## 프로그램 시연 주소
This is an example of how you may give instructions on setting up your project locally.
To get a local copy up and running follow these simple example steps.
["https://www.chatosscjh.tk"](https://www.chatosscjh.tk)
### Prerequisites
## 프로그램 설치 방법
This is an example of how to list things you need to use the software and how to install them.
* npm
```sh
npm install npm@latest -g
```
### 사전 준비물
* 파파고 api가 필요하다
여기에 들어가서 api 신청을 마친다.[https://developers.naver.com/apps/#/register?api=ppg_n2mt] (https://developers.naver.com/apps/#/register?api=ppg_n2mt)
* Application 목록에 들어가 Client ID와 Client Secret를 복사해 둔다[https://developers.naver.com/apps/#/list](https://developers.naver.com/apps/#/list)
### Installation
### 프로그램 실행
1. Get a free API Key at [https://example.com](https://example.com)
2. Clone the repo
1. 이 프로그램을 다운받는다.
```sh
git clone https://github.com/your_username_/Project-Name.git
git clone ssh://git@khuhub.khu.ac.kr:12959/2019103219/Amazon_Shopping_Helper.git
```
3. Install NPM packages
2. NPM pactages를 설치한다.
```sh
npm install
```
4. Enter your API in `config.js`
3. app.js에 들어가서 PAPAGO_ID와 PAPAGO_SECRET에 본인의 Client ID와 Client Secret를 붇인다.
```JS
const API_KEY = 'ENTER YOUR API';
const PAPAGO_ID = 'Client ID';
const PAPAGO_SECRET = 'Client Secret';
```
4. 프로그램을 실행한다.
```sh
node app.js
```
5. 주소창에 localhost:23023을 친다.
## 자기 평가
제작자의 미흡한 node.js, html-javascript 실력으로 인하여 계획해 두었던 기능들을 구현하지 못하였다.
계획의 구상은 다음과 같았다.
- 한국 주소를 영어로 번역해 주는 기능
- 해외 직구 특가를 정리해 놓는 기능(슬릭딜, 쿨엔조이, 뽐뿌 해외핫딜, 딜바다 해외핫딜 등)
- 구매할 물품의 달러가격을 카드수수료를 고려하여 예상 금액을 보여주는 기능
<!-- USAGE EXAMPLES -->
## Usage
Use this space to show useful examples of how a project can be used. Additional screenshots, code examples and demos work well in this space. You may also link to more resources.
_For more examples, please refer to the [Documentation](https://example.com)_
<!-- ROADMAP -->
## Roadmap
See the [open issues](https://github.com/othneildrew/Best-README-Template/issues) for a list of proposed features (and known issues).
<!-- CONTRIBUTING -->
## Contributing
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are **greatly appreciated**.
1. Fork the Project
2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)
3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)
4. Push to the Branch (`git push origin feature/AmazingFeature`)
5. Open a Pull Request
이중에서 구현한 기능은 첫번째 기능 뿐이다.
또한 html을 처음 써보게 되어서 홈페이지 디자인이 너무 미흡하다.
<!-- LICENSE -->
## License
Distributed under the MIT License. See `LICENSE` for more information.
Distributed under the Apache License ver2. See [`LICENSE`](http://khuhub.khu.ac.kr/2019103219/Amazon_Shopping_Helper/blob/master/License) for more information.
<!-- CONTACT -->
## Contact
Your Name - [@your_twitter](https://twitter.com/your_username) - email@example.com
Project Link: [https://github.com/your_username/repo_name](https://github.com/your_username/repo_name)
<!-- ACKNOWLEDGEMENTS -->
## Acknowledgements
* [GitHub Emoji Cheat Sheet](https://www.webpagefx.com/tools/emoji-cheat-sheet)
* [Img Shields](https://shields.io)
* [Choose an Open Source License](https://choosealicense.com)
* [GitHub Pages](https://pages.github.com)
* [Animate.css](https://daneden.github.io/animate.css)
* [Loaders.css](https://connoratherton.com/loaders)
* [Slick Carousel](https://kenwheeler.github.io/slick)
* [Smooth Scroll](https://github.com/cferdinandi/smooth-scroll)
* [Sticky Kit](http://leafo.net/sticky-kit)
* [JVectorMap](http://jvectormap.com)
* [Font Awesome](https://fontawesome.com)
장주현 - [@facebook](https://www.facebook.com/joohyun7u/) - email@example.com
Project Link: [http://khuhub.khu.ac.kr/2019103219/Amazon_Shopping_Helper](http://khuhub.khu.ac.kr/2019103219/Amazon_Shopping_Helper)
## 참고사항
<!-- MARKDOWN LINKS & IMAGES -->
<!-- https://www.markdownguide.org/basic-syntax/#reference-style-links -->
[contributors-shield]: https://img.shields.io/github/contributors/othneildrew/Best-README-Template.svg?style=flat-square
[contributors-url]: https://github.com/othneildrew/Best-README-Template/graphs/contributors
[forks-shield]: https://img.shields.io/github/forks/othneildrew/Best-README-Template.svg?style=flat-square
[forks-url]: https://github.com/othneildrew/Best-README-Template/network/members
[stars-shield]: https://img.shields.io/github/stars/othneildrew/Best-README-Template.svg?style=flat-square
[stars-url]: https://github.com/othneildrew/Best-README-Template/stargazers
[issues-shield]: https://img.shields.io/github/issues/othneildrew/Best-README-Template.svg?style=flat-square
[issues-url]: https://github.com/othneildrew/Best-README-Template/issues
[license-shield]: https://img.shields.io/github/license/othneildrew/Best-README-Template.svg?style=flat-square
[license-url]: https://github.com/othneildrew/Best-README-Template/blob/master/LICENSE.txt
[linkedin-shield]: https://img.shields.io/badge/-LinkedIn-black.svg?style=flat-square&logo=linkedin&colorB=555
[linkedin-url]: https://linkedin.com/in/othneildrew
[product-screenshot]: images/screenshot.png
다음 우편번호 서비스: [http://postcode.map.daum.net/guide](http://postcode.map.daum.net/guide)
파파고 번역: [https://developers.naver.com/docs/papago/papago-nmt-overview.md](https://developers.naver.com/docs/papago/papago-nmt-overview.md)
\ No newline at end of file
......
......@@ -6,9 +6,10 @@ const app = express();
const PAPAGO_URL = 'https://openapi.naver.com/v1/papago/n2mt'
const PAPAGO_ID = 'cIZBOTfISMHEyygh_NHp';
const PAPAGO_SECRET = '8D32UNGgYp';
const path = require('path');
const HTTPS = require('https');
const domain = "www.chatosscjh.tk"
const PORT = process.env.PORT || 3000;
const sslport = 23023;
//const indexRoute = require("./routes/index");
app.use(bodyParser.urlencoded({extended: true}));
......@@ -82,6 +83,7 @@ app.post('/', async function(req,res){
extraaddressE = body.message.result.translatedText;
}
});
setTimeout(function(){
var splitaddressE = addressE.split(", ");
cityE = splitaddressE[4];
......@@ -100,11 +102,6 @@ app.post('/', async function(req,res){
}
});
app.listen(PORT, function(){
console.log('listen',PORT);
});
function trans(message, totrans){
request.post(
{
......@@ -129,14 +126,14 @@ function trans(message, totrans){
try {
const option = {
ca: fs.readFileSync('/etc/letsencrypt/live/' + domain +'/fullchain.pem'),
key: fs.readFileSync(path.resolve(process.cwd(), '/etc/letsencrypt/live/'$
cert: fs.readFileSync(path.resolve(process.cwd(), '/etc/letsencrypt/live/$
key: fs.readFileSync(path.resolve(process.cwd(), '/etc/letsencrypt/live/' + domain +'/privkey.pem'), 'utf8').toString(),
cert: fs.readFileSync(path.resolve(process.cwd(), '/etc/letsencrypt/live/' + domain +'/cert.pem'), 'utf8').toString(),
};
HTTPS.createServer(option, app).listen(sslport, () => {
console.log(`[HTTPS] Server is started on port ${sslport}`);
});
} catch (error) {
console.log('[HTTPS] HTTPS 오류가 발생하였습니다. HTTPS 서버는 실행되지 $
console.log('[HTTPS] HTTPS 오류가 발생하였습니다. HTTPS 서버는 실행되지 않습니다.');
console.log(error);
}
......
{
"requires": true,
"name": "amazon_shopping_helper",
"version": "1.0.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
"accepts": {
"version": "1.3.7",
......