Socket
Book a DemoInstallSign in
Socket

@socketsupply/next-native

Package Overview
Dependencies
Maintainers
3
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@socketsupply/next-native

Run Next.js Applications on the Socket Runtime

latest
npmnpm
Version
0.0.2
Version published
Weekly downloads
0
-100%
Maintainers
3
Weekly downloads
 
Created
Source

SYNOPSIS

Next-Natve is a project that makes it possible to build native, cross-platform apps using the Next.js framework.

[!WARNING] This is pre-release software! It requires the dev branch of the socket-runtime. It's only ready for early adopters and potential contributors

USAGE

During pre-release...

# from the socket repo
npm run relink

# from the repo you are working on
npm link @socketsupply/socket

FROM CLI

Use as a command line tool to initialize an existing project as a native app.

$ npm i @socketsupply/next-native -g
$ next-native -h
next-native v0.5.4 (97fa3f7c)

usage:
  next-native [SUBCOMMAND] [options] [<project-dir>]
  next-native [SUBCOMMAND] -h

subcommands:
  build                                build project
  list-devices                         get the list of connected devices
  init                                 create a new project (in the current directory)
  install-app                          install app to the device
  print-build-dir                      print build path to stdout
  run                                  run application
  env                                  print relavent environment variables
  setup                                install build dependencies

general options:
  -h, --help                           print help message
  --prefix                             print install path
  -v, --version                        print program version

AS CODE

Use as a module inside to create a nextjs server inside a service worker. See this example to get a quick demo up and running.

$ npm i @socketsupply/next-native -S
import createServer from 'npm:@socketsupply/next-native'

const server = await createServer()
console.log('Created Server')

server.start().then(() => {
  console.log('Started Server')
})

Keywords

next

FAQs

Package last updated on 06 May 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts