![]() ![]() The server exposes API endpoints that you can use to interact with files, like your typical endpoints that either GET or POST a file, as well as methods to get information about the files stored. Now that you have the application running, let’s dive into some of the details of how it works. To perform the basic file operations, you’ll need to select a server and simply enter the values that were output when you started the server earlier: The application is built with a fairly self-explanatory interface. Once the application starts up, you should see the following: You could also use pnpm to run the desktop application. Here, you’ll install packages with npm install and start the application with npm run tauri dev. Once you have all of the prerequisites installed, you should be able to open a terminal and go to the desktop directory of the Snorlax repo. When I initially got set up, I also had to upgrade my version of Rust. There is a lot you can do with Tauri, and I highly recommend checking out the guides. If you’re not familiar with it, Tauri is an application development toolkit that leverages Rust to build performant applications. The client application is built with React and Tauri, so you’ll need to install the necessary Tauri prerequisites. Now that the server is started, go into the desktop folder and start the client application. You’ll see the following: SNORLAX SERVER v1.0.0 □Įnter port where server should run : Once you’ve determined a storage location, select the port to run it on the default is PORT 8000. Once that’s done, you should see a message asking for a default storage location, which creates a folder inside the server to store your files: SNORLAX SERVER v1.0.0 □Įnter storage location : Run the go get command followed by the go run main.go command. Open your terminal and navigate to the /server folder. Follow the instructions for your OS of choice from the docs. To get it up and running, you’ll need to install Go. You can find the Snorlax server in the server folder in the GitHub repo. You can follow along by accessing the source code for Snorlax on GitHub, which includes the server code as well as a desktop application built with React and Tauri. In this article, we’ll discuss what Snorlax is and walk through building a React application that connects to a Snorlax server. We can create a frontend that looks similar to the Finder on MacOS or Window’s File Explorer using Snorlax’s API. Built with Go and Rust, Snorlax offers a simple API that you can leverage to handle the basic Create, Read, Update, and Delete (CRUD) functions, which are typically required. Snorlax is an open source file management system that you can deploy and connect to a web application. Building a file manager in React with Snorlax Andrew Evans Follow Husband, engineer, FOSS contributor, and developer at AWS. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |