Code Practices about a File Server creation, sending and receiving files via Node.js + React +TypeScript + Express web framework


I would like to share sample codes for a file server and some samples how to send and receive JSON files by utilizing Node.js + React Native + Typescript + Express Web framework.

you can download the codes and take them as a sample where you want to use.

File Server codes are in following link: 

It utilizes Express Web Framework for Node.js. 

All dependent modules are already defined in my github repository so Once you download it, you will be able to run with npm start immediately. Service is going to settle to default port 8000 .

File Server is configured for sending and receiving for JSON formated files However, you can also manipulate codes for any type of file. 

Call can be done as below:

http://<server name>:8000/api/download?filename=<file name>.json
There is a code sample regarding file retrieval in the following link:

It fetches json object from file server then binds JSON objects to a table through Interface with TypeScript . JSON object is kept in useState.

File Server also services storing JSON files in a directory to be retrieved later on.
http://<server name8000/api/upload

File Server pushes JSON file to "./uploads" folder 

Here is the sample code; how you post any files through XMLHttpRequest with POST message.

enjoy !


Popular posts from this blog

Assembly Microsoft.Dynamics.Service.Plugins.dll can not be loaded. Dynamics CRM 365 Engine version 9 - CRM User creation error

Exception caught instantiating TERADATA report server extension SQL Reporting Services

Could not load file or assembly 'System.ServiceModel, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089'. The system cannot find the file specified at Configuration class initiation in