0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

APIを使う前に.envファイルを追加してAPIkeyをリポジトリに含めないようにする

Posted at

目的

APIを使う前にenvファイルを追加してリポジトリに含めないようにする

環境

  • windows 11
  • ruby 3.0.6p216
  • Rails 6.1.7.6
  • node v16.20.2

いざ出陣

.envファイル作成

ルートディレクトリに.envファイルを作成

.env
API_KEY=your_api_key_here

.envファイルをリポジトリに含めないようにする

.gitignore
.env

余談

これで安心

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?