在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:MLH/mlh-localhost-github开源软件地址:https://github.com/MLH/mlh-localhost-github开源编程语言:JavaScript 51.1%开源软件介绍:MLH Localhost Hometown MapThis repository contains the source code for a map of the hometowns of anyone who attends the MLH Localhost workshop, How to Collaborate on Code Projects with GitHub. Participants learn best practice GitHub workflows, add their hometown to How to participate in this workshop
Technologies used in this projectGitHub ActionsGitHub actions allows us to run a NodeJS script automatically when a commit is pushed to the project. That script takes all the locations provided and turns them into latitude & longitude coordinates. GitHub PagesGitHub pages lets us host our map on GitHub as a webpage. NodeJSWe chose to use NodeJS as the language to turn all the hometown names into coordinates. dotenvDotenv is a zero-dependency module that loads environment variables from a node-geocoderNode library for geocoding and reverse geocoding. Try the application locally, if you want!Google Maps API KeyTo use the Google Maps JavaScript API, you will ned an API Key. The API key is used to track API requests associated with your project for usage and billing. To learn more about API keys, see the API Key Best Practices and the FAQs. Adding a new locationThe App reads its locations from the
To add a new location, simply append a new line to the locations.txt file Running the application:To run this application locally, you'll need to:
There is a
Now inside the root folder run the following:
This will turn each line in the You can see your own map by running:
|
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论