File tree Expand file tree Collapse file tree 3 files changed +13
-14
lines changed
Expand file tree Collapse file tree 3 files changed +13
-14
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ class StaticServer {
2222 break ;
2323 case 2 :
2424 this . port = `${ port } ` ;
25- if ( typeof ( arguments [ 1 ] ) === 'string' ) {
25+ if ( typeof ( arguments [ 1 ] ) === 'string' ) {
2626 this . root = root ;
2727 this . localOnly = false ;
2828 this . keepAlive = false ;
@@ -35,7 +35,7 @@ class StaticServer {
3535 }
3636 break ;
3737 case 1 :
38- if ( typeof ( arguments [ 0 ] ) === 'number' ) {
38+ if ( typeof ( arguments [ 0 ] ) === 'number' ) {
3939 this . port = `${ port } ` ;
4040 this . root = ROOT ;
4141 this . localOnly = false ;
@@ -64,7 +64,7 @@ class StaticServer {
6464 }
6565
6666 start ( ) {
67- if ( this . running ) {
67+ if ( this . running ) {
6868 return Promise . resolve ( this . origin ) ;
6969 }
7070
Original file line number Diff line number Diff line change 66#import " GCDWebServerFileResponse.h"
77#import " GCDWebServerHTTPStatusCodes.h"
88
9- @interface FPStaticServer : NSObject <RCTBridgeModule>
10- {
9+ @interface FPStaticServer : NSObject <RCTBridgeModule> {
1110 GCDWebServer *_webServer;
1211}
1312
14- @property (nonatomic , retain ) NSString *localPath;
15- @property (nonatomic , retain ) NSString *url;
13+ @property (nonatomic , retain ) NSString *localPath;
14+ @property (nonatomic , retain ) NSString *url;
1615
17- @property (nonatomic , retain ) NSString *www_root;
18- @property (nonatomic , retain ) NSNumber *port;
19- @property (nonatomic , retain ) NSDictionary <NSString *, NSString *> *mime_type_overrides;
20- @property (assign ) BOOL localhost_only;
21- @property (assign ) BOOL keep_alive;
16+ @property (nonatomic , retain ) NSString *www_root;
17+ @property (nonatomic , retain ) NSNumber *port;
18+ @property (nonatomic , retain ) NSDictionary <NSString *, NSString *> *mime_type_overrides;
19+ @property (assign ) BOOL localhost_only;
20+ @property (assign ) BOOL keep_alive;
2221
2322@end
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ - (dispatch_queue_t)methodQueue
3030}
3131
3232
33- RCT_EXPORT_METHOD (start:(NSString *)port
33+ RCT_EXPORT_METHOD (start: (NSString *)port
3434 root:(NSString *)optroot
3535 localOnly:(BOOL *)localhost_only
3636 keepAlive:(BOOL *)keep_alive
@@ -107,7 +107,7 @@ - (dispatch_queue_t)methodQueue
107107 response = [GCDWebServerResponse responseWithStatusCode: kGCDWebServerHTTPStatusCode_NotFound ];
108108 }
109109 } else if ([fileType isEqualToString: NSFileTypeRegular ]) {
110- if (allowRangeRequests) {
110+ if (allowRangeRequests) {
111111 response = [[GCDWebServerFileResponse alloc ] initWithFile: filePath byteRange: request.byteRange isAttachment: NO mimeTypeOverrides: mime_type_overrides] ;
112112 [response setValue: @" bytes" forAdditionalHeader: @" Accept-Ranges" ];
113113 } else {
You can’t perform that action at this time.
0 commit comments