Ubuntu 22.04
Sponsored Link

Next.js : स्थापित करें2023/09/13

 
Next.js इंस्टॉल करें जो एक React-आधारित वेब डेवलपमेंट फ्रेमवर्क है।
[1]
[2] एक सामान्य उपयोगकर्ता के साथ एक परीक्षण Next.js एप्लिकेशन बनाएं।
ubuntu@dlp:~$
mkdir testproject

ubuntu@dlp:~$
cd testproject
# Next.js एप्लिकेशन बनाएं [test-app]

ubuntu@dlp:~/testproject$
npx create-next-app test-app

Need to install the following packages:
  create-next-app
Ok to proceed? (y) y
Creating a new Next.js app in /home/ubuntu/testproject/test-app.

Using npm.

.....
.....

added 211 packages, and audited 230 packages in 18s

75 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities

Initialized a git repository.

Success! Created test-app at /home/ubuntu/testproject/test-app

ubuntu@dlp:~/testproject$
cd test-app
# विकास सर्वर चलाएँ

ubuntu@dlp:~/testproject/test-app$
npm run dev


> test-app@0.1.0 dev
> next dev

ready - started server on 0.0.0.0:3000, url: http://localhost:3000
info  - SWC minify release candidate enabled. https://nextjs.link/swcmin
event - compiled client and server successfully in 3.1s (178 modules)
wait  - compiling...
event - compiled client and server successfully in 161 ms (178 modules)
Attention: Next.js now collects completely anonymous telemetry regarding usage.
This information is used to shape Next.js' roadmap and prioritize features.
You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL:
https://nextjs.org/telemetry

# ऐप को प्रोडक्शन मोड में बनाएं और चलाएं

ubuntu@dlp:~/testproject/test-app$
npm run build

> test-app@0.1.0 build
> next build

info  - SWC minify release candidate enabled. https://nextjs.link/swcmin
info  - Linting and checking validity of types
info  - Creating an optimized production build
info  - Compiled successfully
info  - Collecting page data
info  - Generating static pages (3/3)
info  - Finalizing page optimization

.....
.....

  (Server)  server-side renders at runtime (uses getInitialProps or getServerSideProps)
  (Static)  automatically rendered as static HTML (uses no initial props)

ubuntu@dlp:~/testproject/test-app$ npm start 

> test-app@0.1.0 start
> next start

ready - started server on 0.0.0.0:3000, url: http://localhost:3000
  किसी भी क्लाइंट कंप्यूटर से ऊपर कंसोल पर दिखाए गए यूआरएल तक पहुंच, और फिर यदि निम्नलिखित ऐप दिखाया जाता है तो यह ठीक है।
मिलान सामग्री