{"id":1236,"date":"2025-04-27T08:17:45","date_gmt":"2025-04-27T08:17:45","guid":{"rendered":"https:\/\/www.freelifemakers.org\/wordpress\/?p=1236"},"modified":"2026-07-18T10:04:16","modified_gmt":"2026-07-18T01:04:16","slug":"nodejs9-reactnative-login3","status":"publish","type":"post","link":"https:\/\/www.freelifemakers.org\/wordpress\/index.php\/2025\/04\/27\/nodejs9-reactnative-login3\/","title":{"rendered":"nodejs9-\ub9ac\uc561\ud2b8\ub124\uc774\ud2f0\ube0c \ub85c\uadf8\uc778\/ReactNative Login(3)"},"content":{"rendered":"\n<p>\u2705 \ucf54\ub4dc \ub2e4\uc6b4\ub85c\ub4dc \/ Code Download <br><a href=\"https:\/\/github.com\/gideonslife01\/flm-js-nodejs\">https:\/\/github.com\/gideonslife01\/flm-js-nodejs<\/a><\/p>\n\n\n\n<p>\ud83d\udc49\ud83c\udffb \uc5ec\uae30\ub294 nodejs \uc11c\ubc84\uc640 \ubaa8\ubc14\uc77c \uc571 \uc5f0\ub3d9 \ubd80\ubd84\uc785\ub2c8\ub2e4.<br>This section covers the integration between the Node.js server and the mobile app.<\/p>\n\n\n\n<p>\ud83d\udc49\ud83c\udffb nodejs\ub514\ub809\ud1a0\ub9ac \ub0b4\uc5d0 package.json\uc740 \uc124\uce58\ub41c \ubaa8\ub4c8 \ub9ac\uc2a4\ud2b8\uc785\ub2c8\ub2e4.<br>package.json in the nodejs directory is a list of installed modules.<\/p>\n\n\n\n<p>\ud83d\udc49\ud83c\udffb server1.js\ub294 nodejs\uc11c\ubc84 \ubd80\ubd84\uc785\ub2c8\ub2e4.<br>server1.js is the nodejs server part.<\/p>\n\n\n\n<p>\ud83d\udc49\ud83c\udffb public\/login.ejs \ud30c\uc77c\uc740 ejs\ud30c\uc77c\ub85c \ub85c\uadf8\uc778 \ud3fc\uc5d0 \ud574\ub2f9\ud558\ub294 \ubd80\ubd84\uc785\ub2c8\ub2e4.<br>The public\/login.ejs file is an ejs file that corresponds to the login form.<\/p>\n\n\n\n<p><br>\ud83d\udc49\ud83c\udffb<strong>1.\ubaa8\ub4c8\uc124\uce58 \/ module install<\/strong><br>\u2714\ufe0f nodejs\ub514\ub809\ud1a0\ub9ac\ub97c \ub2e4\uc6b4 \ubc1b\uc544\uc11c \uc258(\ub610\ub294 \uba85\ub839\ud504\ub86c\ud504\ud2b8)\uc5d0\uc11c nodejs\ub514\ub809\ud1a0\ub9ac\ub85c \uc774\ub3d9\ud6c4\uc5d0 package.json\ud30c\uc77c\uc744 \uc5f4\uace0 \ubaa8\ub4c8\uc124\uce58\ub97c \uc9c4\ud589\ud569\ub2c8\ub2e4.<br>Download the nodejs directory, move to the nodejs directory in the shell (or command prompt), open the package.json file, and proceed with module installation.<\/p>\n\n\n\n<p>\u2714\ufe0f \uad75\uc740 \uae00\uc528\ub85c \ud45c\uc2dc\ub41c \ubd80\ubd84\uc744 npm install bcrypt \uc774\ub807\uac8c \uc124\uce58 \ud558\uc2dc\uba74 \ub429\ub2c8\ub2e4.<br>You can install the part marked in bold by running npm install bcrypt.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>{\n  \"name\": \"login\",\n  \"version\": \"1.0.0\",\n  \"description\": \"login array\",\n  \"main\": \"server1.js\",\n  \"scripts\": {\n    \"test\": \"echo \\\"Error: no test specified\\\" &amp;&amp; exit 1\"\n  },\n  \"author\": \"daekyeong kim\",\n  \"license\": \"MIT\",\n  \"dependencies\": {\n<strong>    \"bcrypt\": \"^5.1.1\",\n    \"express\": \"^5.1.0\",\n    \"express-session\": \"^1.18.1\"<\/strong>\n  }\n}\n<\/code><\/pre>\n\n\n\n<p>\ud83d\udc49\ud83c\udffb<strong>2.\uc11c\ubc84\uc2e4\ud589<\/strong> \/ Run Server<br>\u2714\ufe0f \ud574\ub2f9 \ub514\ub809\ud1a0\ub9ac \ub0b4\uc5d0\uc11c node server1.js\ub97c \uc2e4\ud589\ud569\ub2c8\ub2e4.<br>Run node server1.js inside that directory.<\/p>\n\n\n\n<p>\u2714\ufe0f \ube0c\ub77c\uc6b0\uc800\uc5d0\uc11c localhost:3000\uc744 \uc2e4\ud589\ud558\uba74 \ub2e4\uc74c\uacfc \uac19\uc740 \ud654\uba74\uc774 \uc2e4\ud589\ub418\uba74 \uc815\uc0c1 \uc785\ub2c8\ub2e4.<br>If you run localhost:3000 from the browser and the following screen appears, it is normal.<\/p>\n\n\n\n<p>\u2714\ufe0f id\ub294 testuser\uc774\uace0 password\ub294 11111111\uc785\ub2c8\ub2e4.<br>id is testuser and password is 11111111.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"866\" height=\"270\" src=\"https:\/\/www.freelifemakers.org\/wordpress\/wp-content\/uploads\/2025\/04\/webloginform.jpg\" alt=\"\" class=\"wp-image-1240\" srcset=\"https:\/\/www.freelifemakers.org\/wordpress\/wp-content\/uploads\/2025\/04\/webloginform.jpg 866w, https:\/\/www.freelifemakers.org\/wordpress\/wp-content\/uploads\/2025\/04\/webloginform-300x94.jpg 300w, https:\/\/www.freelifemakers.org\/wordpress\/wp-content\/uploads\/2025\/04\/webloginform-768x239.jpg 768w\" sizes=\"auto, (max-width: 866px) 100vw, 866px\" \/><\/figure>\n\n\n\n<p><strong>\ud83d\udc49\ud83c\udffb3.\ub9ac\uc561\ud2b8\ub124\uc774\ud2f0\ube0c \uc571\uc5d0\uc11c \ub85c\uadf8\uc778<\/strong><br>Logging in in a React Native app<\/p>\n\n\n\n<p>\u2714\ufe0f \ud504\ub85c\uc81d\ud2b8 \ub514\ub809\ud1a0\ub9ac\ub85c\uc774\ub3d9 \ud6c4 \ud130\ubbf8\ub110\uc5d0\uc11c \uc571\uc744 \uc2e4\ud589\ud569\ub2c8\ub2e4.<br>Navigate to the project directory and run the app in the terminal.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># android\nnpm run android\n\n# ios\nnpm run ios<\/code><\/pre>\n\n\n\n<p>\u2714\ufe0f \ubc14\ub85c \uc704\uc758 \uc6f9\uc5d0\uc11c \uc2e4\ud589\ud55c\uac83\ucc98\ub7fc \uc571\uc5d0\uc11c \uc544\uc774\ub514\ub294 testuser\uc774\uace0 \ud328\uc2a4\uc6cc\ub4dc\ub294 11111111\uc744 \uc785\ub825\ud569\ub2c8\ub2e4.<br>Just as you did on the web above, enter &#8216;testuser&#8217; as the ID and &#8216;11111111&#8217; as the password in the app.<\/p>\n\n\n\n<p>\u2714\ufe0f \ub85c\uadf8\uc778\uc774 \uc644\ub8cc\ub418\uba74 \uc544\ub798\uc640 \uac19\uc740 \ud654\uba74\uc744 \ubcfc \uc218 \uc788\uc2b5\ub2c8\ub2e4.<br>Once logged in, you will see a screen like the one below.<\/p>\n\n\n\n<p>&#8212; IOS<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"470\" height=\"1024\" src=\"https:\/\/www.freelifemakers.org\/wordpress\/wp-content\/uploads\/2025\/04\/nodejs9-ios-2-jpg-470x1024.jpg\" alt=\"\" class=\"wp-image-6669\" srcset=\"https:\/\/www.freelifemakers.org\/wordpress\/wp-content\/uploads\/2025\/04\/nodejs9-ios-2-jpg-470x1024.jpg 470w, https:\/\/www.freelifemakers.org\/wordpress\/wp-content\/uploads\/2025\/04\/nodejs9-ios-2-jpg-138x300.jpg 138w, https:\/\/www.freelifemakers.org\/wordpress\/wp-content\/uploads\/2025\/04\/nodejs9-ios-2-jpg-768x1673.jpg 768w, https:\/\/www.freelifemakers.org\/wordpress\/wp-content\/uploads\/2025\/04\/nodejs9-ios-2-jpg-705x1536.jpg 705w, https:\/\/www.freelifemakers.org\/wordpress\/wp-content\/uploads\/2025\/04\/nodejs9-ios-2-jpg-400x871.jpg 400w, https:\/\/www.freelifemakers.org\/wordpress\/wp-content\/uploads\/2025\/04\/nodejs9-ios-2-jpg.jpg 774w\" sizes=\"auto, (max-width: 470px) 100vw, 470px\" \/><figcaption class=\"wp-element-caption\">IOS<\/figcaption><\/figure>\n\n\n\n<p>&#8212; Android<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"461\" height=\"1024\" src=\"https:\/\/www.freelifemakers.org\/wordpress\/wp-content\/uploads\/2025\/04\/nodejs9-android-2-jpg-461x1024.jpg\" alt=\"\" class=\"wp-image-6671\" srcset=\"https:\/\/www.freelifemakers.org\/wordpress\/wp-content\/uploads\/2025\/04\/nodejs9-android-2-jpg-461x1024.jpg 461w, https:\/\/www.freelifemakers.org\/wordpress\/wp-content\/uploads\/2025\/04\/nodejs9-android-2-jpg-135x300.jpg 135w, https:\/\/www.freelifemakers.org\/wordpress\/wp-content\/uploads\/2025\/04\/nodejs9-android-2-jpg-400x889.jpg 400w, https:\/\/www.freelifemakers.org\/wordpress\/wp-content\/uploads\/2025\/04\/nodejs9-android-2-jpg.jpg 514w\" sizes=\"auto, (max-width: 461px) 100vw, 461px\" \/><figcaption class=\"wp-element-caption\">Android<\/figcaption><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>\u2705 \ucf54\ub4dc \ub2e4\uc6b4\ub85c\ub4dc \/ Code Download https:\/\/github.com\/gideonslife01\/flm-js-nodejs \ud83d\udc49\ud83c\udffb \uc5ec\uae30\ub294 nodejs \uc11c\ubc84\uc640 \ubaa8\ubc14\uc77c \uc571 \uc5f0\ub3d9 \ubd80\ubd84\uc785\ub2c8\ub2e4.This section covers the integration between the Node.js server and the mobile app. \ud83d\udc49\ud83c\udffb nodejs\ub514\ub809\ud1a0\ub9ac \ub0b4\uc5d0 package.json\uc740 \uc124\uce58\ub41c \ubaa8\ub4c8 \ub9ac\uc2a4\ud2b8\uc785\ub2c8\ub2e4.package.json in the nodejs directory is a list of installed modules. \ud83d\udc49\ud83c\udffb server1.js\ub294 nodejs\uc11c\ubc84 \ubd80\ubd84\uc785\ub2c8\ub2e4.server1.js is the nodejs server part. \ud83d\udc49\ud83c\udffb public\/login.ejs [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9,5,1],"tags":[],"class_list":["post-1236","post","type-post","status-publish","format-standard","hentry","category-nodejs","category-reactnative","category-uncategorized","missing-thumbnail"],"_links":{"self":[{"href":"https:\/\/www.freelifemakers.org\/wordpress\/index.php\/wp-json\/wp\/v2\/posts\/1236","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.freelifemakers.org\/wordpress\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.freelifemakers.org\/wordpress\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.freelifemakers.org\/wordpress\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.freelifemakers.org\/wordpress\/index.php\/wp-json\/wp\/v2\/comments?post=1236"}],"version-history":[{"count":21,"href":"https:\/\/www.freelifemakers.org\/wordpress\/index.php\/wp-json\/wp\/v2\/posts\/1236\/revisions"}],"predecessor-version":[{"id":6676,"href":"https:\/\/www.freelifemakers.org\/wordpress\/index.php\/wp-json\/wp\/v2\/posts\/1236\/revisions\/6676"}],"wp:attachment":[{"href":"https:\/\/www.freelifemakers.org\/wordpress\/index.php\/wp-json\/wp\/v2\/media?parent=1236"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.freelifemakers.org\/wordpress\/index.php\/wp-json\/wp\/v2\/categories?post=1236"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.freelifemakers.org\/wordpress\/index.php\/wp-json\/wp\/v2\/tags?post=1236"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}