国产av日韩一区二区三区精品,成人性爱视频在线观看,国产,欧美,日韩,一区,www.成色av久久成人,2222eeee成人天堂

? ? ????? JS ???? ???? ????: ??? ?? ????? ??? ?? ???? ?? ??

???? ????: ??? ?? ????? ??? ?? ???? ?? ??

Nov 26, 2024 am 12:26 AM

???

  1. ??
  2. ????
  3. ?? ??
  4. API
  5. ?????
  6. ??? ?
  7. ?? ????
  8. ????
  9. ???

????: https://github.com/aelassas/bookcars

??: https://bookcars.dynv6.net:3002

??

? ????? ?? ?? ?? ??? ??? ? ?? ?? ??? ??? ?? ????? ??? ?? ???? ?? ???? ??????.

  • UI/UX ??: ??? ??? ??? ?? ??? ?? ??? ??????
  • ??? ??: ?? ??? ???? ?? ??? ???? ?? ? ??? ?? ??
  • ??? DevOps: ???? ??? ????? ???? ?????? ??, ?? ? ????
  • ???? ??: ??? ???? ?? ?? ?? ??? ??? ??? ?????

?? ??

?? ???? ? ?? ??? ??? ????.

  • ??????
  • Node.js
  • ??DB
  • ??
  • ??
  • ??? ????
  • ???
  • ?????
  • ??

TypeScript? ??? ?? ??? ?? ??? ??? TypeScript? ????? ???????. TypeScript? ??? ???, ?? ? ??? ???? ??? ? ???? ?? ???, ???, ?? ?? ?? ??? ?? ??? ?????.

?? ??? ??? ??? ?? React? ????, ??? ??? ???? ?? MongoDB?, ??? ?? ??? ?? Stripe? ??????.

? ??? ???? ??? ????? ??? ?? ???? ?? ??? ??? ?? ?? ??? ???? ??? ????? ???? ??? ?? ??? ? ?? ??? ???? ????.

React? ??? ?? ??? ??? ?????.

  1. ???? ?? ????
    • ??? UI? ??? ??? ?? ???? ?? ? ????
    • ??? ?? ?? ???? ????? ?? ????
    • ? ?? ?? ?? ? ??? ??
  2. ?? DOM ??
    • React? ?? DOM? ??? ?? ????? ???????
    • ??? ?? ??? ???? ??? ??? ?????
    • ???? ???? ??
  3. ??? ???
    • ?? ??? ?? ??? ??? ??? ?????
    • ???? ??
    • ??? ???? ?? ??? ????
  4. ??? ??? ??
    • ???? ???? ?? ? ???
    • ??? ??? ??
    • JSX? ???? UI ?? ??? ?? ????? ?? ? ????
  5. ?? ??
    • Meta(?? Facebook) ??
    • ?? ????? ??
    • ???? ??? ??
  6. ???
    • ??? ? ??? ?????? ??? ??
    • ?? ????? ????? ?? ??
    • ??? ??? ?? ??(??????, ???, ??)

?? ??

? ????? ?????, ??? ???? ? ??? ?? ?? ???? ? ? ????.

?????

??????? ???? ?? ??? ??? ???? ??? ??? ? ??? ? ????.

??? ???? ??? ??? ??? ???? ?? ??? ??? ??? ? ?? ????? ?? ??????.

From Zero to Storefront: My Journey Building a Car Rental Website and Mobile App

??? ???? ??? ? ?? ?? ???? ?? ?????.

From Zero to Storefront: My Journey Building a Car Rental Website and Mobile App

??? ???? ?? ??? ???? ??? ? ?? ?? ??????. ???? ???? ?? ?? ??? ??? ??? ? ? ????. ?? ???? ?? ?? ???? ??? ?? ?? ? ??? ???? ?? ???.

From Zero to Storefront: My Journey Building a Car Rental Website and Mobile App

??? ??? ??????. ?????? ?? ??? httpOnly, ??, ?? ? ??? sameSite???.???? ??? XSS, CSRF ? MITM ??? ?????.??? ??? ??? ????? ?? XST ??????? ?????.

From Zero to Storefront: My Journey Building a Car Rental Website and Mobile App

??? ???? ??????.

From Zero to Storefront: My Journey Building a Car Rental Website and Mobile App

??? ???? ?? ??? ???? ??? ? ?? ??????.

From Zero to Storefront: My Journey Building a Car Rental Website and Mobile App

??? ???? ?? ??? ??? ? ? ?? ??????.

From Zero to Storefront: My Journey Building a Car Rental Website and Mobile App

??? ?? ??????.

From Zero to Storefront: My Journey Building a Car Rental Website and Mobile App

??? ??? ?? ??????.

From Zero to Storefront: My Journey Building a Car Rental Website and Mobile App

??? ??? ??? ??? ???? ??? ? ?? ??????.

From Zero to Storefront: My Journey Building a Car Rental Website and Mobile App

?? ???? ??? ?????? ?? ??????.

?? ????

????? ? ?? ??? ????.

  • ???: ??? ????? ?? ?? ??? ??? ????. ?? ???? ? ? ????.
  • ???: ??? ????? ?? ???? ???? ????. ?? ??? ??? ??? ? ????.
  • ???: ?????? ??? ??? ???? ? ????. ??? ????? ???? ? ????.

? ???? ?? ????? ????? ???????. ? ????? ?? ?????? ?? ? ??? ??? ? ????. ???? ? ??? ?????? ??? ?? ????.

?? ?????? ???? ????, ???, ??, ??? ? ??? ???? ??? ? ????.

???? ? ????? ???? ?? ????? ?? ? ??? ??? ? ??? ?? ????? ???? ? ?? ?? ??? ?? ?? ???? ?? ???.

??? ??? ???? ??? ??????.

From Zero to Storefront: My Journey Building a Car Rental Website and Mobile App

??? ???? ????? ??? ???? ??? ? ?? ??? ????? ???? ??????.

From Zero to Storefront: My Journey Building a Car Rental Website and Mobile App

??? ????? ???? ??? ? ?? ??????.

From Zero to Storefront: My Journey Building a Car Rental Website and Mobile App

??? ???? ????? ???? ??? ??? ???? ? ???? ?? ? ?? ??????. ??? ??? ??? ????? ?? ??? ??? 0?? ?????. ??? ?? ?? ?? ??? ????? ???? ???? ?? ???.

From Zero to Storefront: My Journey Building a Car Rental Website and Mobile App

??? ???? ????? ???? ??? ? ?? ??????.

From Zero to Storefront: My Journey Building a Car Rental Website and Mobile App

??? ???? ??? ???? ??? ? ?? ??????.

From Zero to Storefront: My Journey Building a Car Rental Website and Mobile App

??? ?? ?? ??????.

From Zero to Storefront: My Journey Building a Car Rental Website and Mobile App

?? ???? ??? ??? ????? ?? ??????.

API

From Zero to Storefront: My Journey Building a Car Rental Website and Mobile App

API? ?? ????, ????? ? ??? ?? ??? ?? ??? ?????. API? MVC ??? ??? ????. ???? JWT? ?????. ??? ??, ??, ?? ?? ?? ? ??? ??? ??? ??, ???? ?? ???? ?? ? ?? ??? ?? ?? ? ??? ???? ?? ??? ????.

  • ./api/src/models/ ???? MongoDB ??? ???? ????.
  • ./api/src/routes/ ???? Express ??? ???? ????.
  • ./api/src/controllers/ ???? ????? ???? ????.
  • ./api/src/middlewares/ ???? ????? ???? ????.
  • ./api/src/config/env.config.ts?? ?? ? TypeScript ?? ??? ???? ????.
  • ./api/src/lang/ ???? ???? ???? ????.
  • ./api/src/app.ts? ??? ???? ?? ?????.
  • ./api/index.ts? API? ?? ??????.

index.ts? API? ?? ??????.

import 'dotenv/config'
import process from 'node:process'
import fs from 'node:fs/promises'
import http from 'node:http'
import https, { ServerOptions } from 'node:https'
import * as env from './config/env.config'
import * as databaseHelper from './common/databaseHelper'
import app from './app'
import * as logger from './common/logger'

if (
  await databaseHelper.connect(env.DB_URI, env.DB_SSL, env.DB_DEBUG)
  && await databaseHelper.initialize()
) {
  let server: http.Server | https.Server

  if (env.HTTPS) {
    https.globalAgent.maxSockets = Number.POSITIVE_INFINITY
    const privateKey = await fs.readFile(env.PRIVATE_KEY, 'utf8')
    const certificate = await fs.readFile(env.CERTIFICATE, 'utf8')
    const credentials: ServerOptions = { key: privateKey, cert: certificate }
    server = https.createServer(credentials, app)

    server.listen(env.PORT, () => {
      logger.info('HTTPS server is running on Port', env.PORT)
    })
  } else {
    server = app.listen(env.PORT, () => {
      logger.info('HTTP server is running on Port', env.PORT)
    })
  }

  const close = () => {
    logger.info('Gracefully stopping...')
    server.close(async () => {
      logger.info(`HTTP${env.HTTPS ? 'S' : ''} server closed`)
      await databaseHelper.close(true)
      logger.info('MongoDB connection closed')
      process.exit(0)
    })
  }

  ['SIGINT', 'SIGTERM', 'SIGQUIT'].forEach((signal) => process.on(signal, close))
}

Node.js? Express? ???? ??? ???? TypeScript ?????. dotenv, process, fs, http, https, mongoose ? app? ??? ?? ??? ?????. ?? ?? HTTPS ?? ??? true? ???? ??? ????, ???? https ??? ??? ?? ? ? ???? ???? HTTPS ??? ?????. ??? ??? http ??? ???? HTTP ??? ?????. ??? PORT ?? ??? ??? ???? ?? ?????.

?? ??? ???? ??? ????? ????? ?? ??? ???? ????. ??? MongoDB ??? ?? ? ?? ?? 0?? ????? ?????. ????? ????? SIGINT, SIGTERM ?? SIGQUIT ??? ??? ? ??? ?? ??? ?????.

app.ts? API? ?? ??????.

import express from 'express'
import compression from 'compression'
import helmet from 'helmet'
import nocache from 'nocache'
import cookieParser from 'cookie-parser'
import i18n from './lang/i18n'
import * as env from './config/env.config'
import cors from './middlewares/cors'
import allowedMethods from './middlewares/allowedMethods'
import supplierRoutes from './routes/supplierRoutes'
import bookingRoutes from './routes/bookingRoutes'
import locationRoutes from './routes/locationRoutes'
import notificationRoutes from './routes/notificationRoutes'
import carRoutes from './routes/carRoutes'
import userRoutes from './routes/userRoutes'
import stripeRoutes from './routes/stripeRoutes'
import countryRoutes from './routes/countryRoutes'
import * as helper from './common/helper'

const app = express()

app.use(helmet.contentSecurityPolicy())
app.use(helmet.dnsPrefetchControl())
app.use(helmet.crossOriginEmbedderPolicy())
app.use(helmet.frameguard())
app.use(helmet.hidePoweredBy())
app.use(helmet.hsts())
app.use(helmet.ieNoOpen())
app.use(helmet.noSniff())
app.use(helmet.permittedCrossDomainPolicies())
app.use(helmet.referrerPolicy())
app.use(helmet.xssFilter())
app.use(helmet.originAgentCluster())
app.use(helmet.crossOriginResourcePolicy({ policy: 'cross-origin' }))
app.use(helmet.crossOriginOpenerPolicy())

app.use(nocache())
app.use(compression({ threshold: 0 }))
app.use(express.urlencoded({ limit: '50mb', extended: true }))
app.use(express.json({ limit: '50mb' }))

app.use(cors())
app.options('*', cors())
app.use(cookieParser(env.COOKIE_SECRET))
app.use(allowedMethods)

app.use('/', supplierRoutes)
app.use('/', bookingRoutes)
app.use('/', locationRoutes)
app.use('/', notificationRoutes)
app.use('/', carRoutes)
app.use('/', userRoutes)
app.use('/', stripeRoutes)
app.use('/', countryRoutes)

i18n.locale = env.DEFAULT_LANGUAGE

await helper.mkdir(env.CDN_USERS)
await helper.mkdir(env.CDN_TEMP_USERS)
await helper.mkdir(env.CDN_CARS)
await helper.mkdir(env.CDN_TEMP_CARS)
await helper.mkdir(env.CDN_LOCATIONS)
await helper.mkdir(env.CDN_TEMP_LOCATIONS)

export default app

?? MongoDB ?? ???? ??? ?? MongoDB ??????? ??? ?????. ?? ?? Express ?? ??? cors, ??, ?? ? nocache? ?? ????? ?????. ?? ???? ?????? ???? ??? ?? ??? ??????. ?? ??? ??, ?? ??, ?? ??, ?? ??, ??? ??, ??? ?? ? ??????? ??? ??? ?? ??? ?? ??? ?????. ????? Express ??? ???? ?? ?????.

API?? 8?? ??? ????. ? ???? MVC ??? ??? SOLID ??? ??? ?? ????? ????. ?? ??? ??? ????.

  • userRoutes: ???? ??? REST ??? ??
  • supplierRoutes: ??? ?? REST ??? ??
  • countryRoutes: ?? ?? REST ?? ??
  • locationRoutes: ??? ??? REST ?? ??
  • carRoutes: ??? ?? REST ?? ??
  • bookingRoutes: ?? ?? REST ?? ??
  • notificationRoutes: ?? ?? REST ?? ??
  • stripeRoutes: Stripe ?? ????? ?? REST ??? ?????

? ??? ??? ????? ?????. ?? ?? countryRoutes? ???? ??? ??? ?????? ???????.

import express from 'express'
import routeNames from '../config/countryRoutes.config'
import authJwt from '../middlewares/authJwt'
import * as countryController from '../controllers/countryController'

const routes = express.Router()

routes.route(routeNames.validate).post(authJwt.verifyToken, countryController.validate)
routes.route(routeNames.create).post(authJwt.verifyToken, countryController.create)
routes.route(routeNames.update).put(authJwt.verifyToken, countryController.update)
routes.route(routeNames.delete).delete(authJwt.verifyToken, countryController.deleteCountry)
routes.route(routeNames.getCountry).get(authJwt.verifyToken, countryController.getCountry)
routes.route(routeNames.getCountries).get(authJwt.verifyToken, countryController.getCountries)
routes.route(routeNames.getCountriesWithLocations).get(countryController.getCountriesWithLocations)
routes.route(routeNames.checkCountry).get(authJwt.verifyToken, countryController.checkCountry)
routes.route(routeNames.getCountryId).get(authJwt.verifyToken, countryController.getCountryId)

export default routes

?? Express Router? ????. ?? ?? ??, ???, ???? ? ????? ???? ??? ?????.

routeNames?? countryRoutes ?? ??? ?????.

const routes = {
  validate: '/api/validate-country',
  create: '/api/create-country',
  update: '/api/update-country/:id',
  delete: '/api/delete-country/:id',
  getCountry: '/api/country/:id/:language',
  getCountries: '/api/countries/:page/:size/:language',
  getCountriesWithLocations: '/api/countries-with-locations/:language/:imageRequired/:minLocations',
  checkCountry: '/api/check-country/:id',
  getCountryId: '/api/country-id/:name/:language',
}

export default routes

countryController?? ??? ?? ?? ???? ??? ???? ????. ????? ?? ??? ? ?? ??? ?? ?? ??? ? ?? ??? ???? ?? ??? ?? ???????.

??? ??? ?????.

import { Schema, model } from 'mongoose'
import * as env from '../config/env.config'

const countrySchema = new Schema<env.Country>(
  {
    values: {
      type: [Schema.Types.ObjectId],
      ref: 'LocationValue',
      required: [true, "can't be blank"],
      validate: (value: any): boolean => Array.isArray(value),
    },
  },
  {
    timestamps: true,
    strict: true,
    collection: 'Country',
  },
)

const Country = model<env.Country>('Country', countrySchema)

export default Country

??? env.Country TypeScript ?????:

export interface Country extends Document {
  values: Types.ObjectId[]
  name?: string
}

???? ?? ?? ?? ????. ??? ???. ????? ??? ????? ?????.

??? LocationValue ?????:

import 'dotenv/config'
import process from 'node:process'
import fs from 'node:fs/promises'
import http from 'node:http'
import https, { ServerOptions } from 'node:https'
import * as env from './config/env.config'
import * as databaseHelper from './common/databaseHelper'
import app from './app'
import * as logger from './common/logger'

if (
  await databaseHelper.connect(env.DB_URI, env.DB_SSL, env.DB_DEBUG)
  && await databaseHelper.initialize()
) {
  let server: http.Server | https.Server

  if (env.HTTPS) {
    https.globalAgent.maxSockets = Number.POSITIVE_INFINITY
    const privateKey = await fs.readFile(env.PRIVATE_KEY, 'utf8')
    const certificate = await fs.readFile(env.CERTIFICATE, 'utf8')
    const credentials: ServerOptions = { key: privateKey, cert: certificate }
    server = https.createServer(credentials, app)

    server.listen(env.PORT, () => {
      logger.info('HTTPS server is running on Port', env.PORT)
    })
  } else {
    server = app.listen(env.PORT, () => {
      logger.info('HTTP server is running on Port', env.PORT)
    })
  }

  const close = () => {
    logger.info('Gracefully stopping...')
    server.close(async () => {
      logger.info(`HTTP${env.HTTPS ? 'S' : ''} server closed`)
      await databaseHelper.close(true)
      logger.info('MongoDB connection closed')
      process.exit(0)
    })
  }

  ['SIGINT', 'SIGTERM', 'SIGQUIT'].forEach((signal) => process.on(signal, close))
}

??? env.LocationValue TypeScript ?????:

import express from 'express'
import compression from 'compression'
import helmet from 'helmet'
import nocache from 'nocache'
import cookieParser from 'cookie-parser'
import i18n from './lang/i18n'
import * as env from './config/env.config'
import cors from './middlewares/cors'
import allowedMethods from './middlewares/allowedMethods'
import supplierRoutes from './routes/supplierRoutes'
import bookingRoutes from './routes/bookingRoutes'
import locationRoutes from './routes/locationRoutes'
import notificationRoutes from './routes/notificationRoutes'
import carRoutes from './routes/carRoutes'
import userRoutes from './routes/userRoutes'
import stripeRoutes from './routes/stripeRoutes'
import countryRoutes from './routes/countryRoutes'
import * as helper from './common/helper'

const app = express()

app.use(helmet.contentSecurityPolicy())
app.use(helmet.dnsPrefetchControl())
app.use(helmet.crossOriginEmbedderPolicy())
app.use(helmet.frameguard())
app.use(helmet.hidePoweredBy())
app.use(helmet.hsts())
app.use(helmet.ieNoOpen())
app.use(helmet.noSniff())
app.use(helmet.permittedCrossDomainPolicies())
app.use(helmet.referrerPolicy())
app.use(helmet.xssFilter())
app.use(helmet.originAgentCluster())
app.use(helmet.crossOriginResourcePolicy({ policy: 'cross-origin' }))
app.use(helmet.crossOriginOpenerPolicy())

app.use(nocache())
app.use(compression({ threshold: 0 }))
app.use(express.urlencoded({ limit: '50mb', extended: true }))
app.use(express.json({ limit: '50mb' }))

app.use(cors())
app.options('*', cors())
app.use(cookieParser(env.COOKIE_SECRET))
app.use(allowedMethods)

app.use('/', supplierRoutes)
app.use('/', bookingRoutes)
app.use('/', locationRoutes)
app.use('/', notificationRoutes)
app.use('/', carRoutes)
app.use('/', userRoutes)
app.use('/', stripeRoutes)
app.use('/', countryRoutes)

i18n.locale = env.DEFAULT_LANGUAGE

await helper.mkdir(env.CDN_USERS)
await helper.mkdir(env.CDN_TEMP_USERS)
await helper.mkdir(env.CDN_CARS)
await helper.mkdir(env.CDN_TEMP_CARS)
await helper.mkdir(env.CDN_LOCATIONS)
await helper.mkdir(env.CDN_TEMP_LOCATIONS)

export default app

LocationValue?? ?? ??(ISO 639-1)? ??? ?? ????.

??? ???? ?? ?????:

import express from 'express'
import routeNames from '../config/countryRoutes.config'
import authJwt from '../middlewares/authJwt'
import * as countryController from '../controllers/countryController'

const routes = express.Router()

routes.route(routeNames.validate).post(authJwt.verifyToken, countryController.validate)
routes.route(routeNames.create).post(authJwt.verifyToken, countryController.create)
routes.route(routeNames.update).put(authJwt.verifyToken, countryController.update)
routes.route(routeNames.delete).delete(authJwt.verifyToken, countryController.deleteCountry)
routes.route(routeNames.getCountry).get(authJwt.verifyToken, countryController.getCountry)
routes.route(routeNames.getCountries).get(authJwt.verifyToken, countryController.getCountries)
routes.route(routeNames.getCountriesWithLocations).get(countryController.getCountriesWithLocations)
routes.route(routeNames.checkCountry).get(authJwt.verifyToken, countryController.checkCountry)
routes.route(routeNames.getCountryId).get(authJwt.verifyToken, countryController.getCountryId)

export default routes

? ????? ?? ??? ???? ??? ??? ?(??? ??? ?)? ???? LocationValue? ?????. ????? ??? ?? ?? ?? ??? ?????.

?????

?????? Node.js, React, MUI ? TypeScript? ??? ? ?????????. ??? ??????? ??? ??? ??? ?? ?? ??? ??? ???? ??? ??? ? ??? ??? ? ????.

  • ./frontend/src/assets/ ???? CSS? ???? ???? ????.
  • ./frontend/src/pages/ ???? React ???? ???? ????.
  • ./frontend/src/comComponents/ ???? React ?? ??? ???? ????.
  • ./frontend/src/services/?? API ????? ???? ???? ????.
  • ./frontend/src/App.tsx? ??? ??? ?? React ????.
  • ./frontend/src/index.tsx? ?????? ?? ??????.

TypeScript ?? ??? ./packages/bookcars-types ???? ???? ????.

App.tsx? ?? ?? ????:

const routes = {
  validate: '/api/validate-country',
  create: '/api/create-country',
  update: '/api/update-country/:id',
  delete: '/api/delete-country/:id',
  getCountry: '/api/country/:id/:language',
  getCountries: '/api/countries/:page/:size/:language',
  getCountriesWithLocations: '/api/countries-with-locations/:language/:imageRequired/:minLocations',
  checkCountry: '/api/check-country/:id',
  getCountryId: '/api/country-id/:name/:language',
}

export default routes

? ??? ???? ?? React ?? ??? ???? ????.

?????? ? ???? ???? ??? ???? ????? ??? ? ???? ?? ? ????.

??? ?

? ???? Android ? iOS? ?? ??? ?? ?????. ??? ?? React Native, Expo ? TypeScript? ???????. ?????? ????? ??? ???? ??? ??? ??? ??? ?? ?? ??? ??? ???? ??? ??? ? ??? ??? ? ????.

????? ??? ?????? ??? ?? ??? ????. ?? ??? Node.js, Expo Server SDK ? Firebase? ???????.

  • ./mobile/assets/ ???? ???? ???? ????.
  • ./mobile/screens/ ???? ?? React Native ??? ???? ????.
  • ./mobile/comComponents/ ???? React Native ?? ??? ???? ????.
  • ./mobile/services/?? API ????? ???? ???? ????.
  • ./mobile/App.tsx? ?? React Native ????.

TypeScript ?? ??? ?? ??? ???? ????.

  • ./mobile/types/index.d.ts
  • ./mobile/types/env.d.ts
  • ./mobile/miscellaneous/bookcarsTypes.ts

./mobile/types/? ??? ?? ./mobile/tsconfig.json? ?????.

import { Schema, model } from 'mongoose'
import * as env from '../config/env.config'

const countrySchema = new Schema<env.Country>(
  {
    values: {
      type: [Schema.Types.ObjectId],
      ref: 'LocationValue',
      required: [true, "can't be blank"],
      validate: (value: any): boolean => Array.isArray(value),
    },
  },
  {
    timestamps: true,
    strict: true,
    collection: 'Country',
  },
)

const Country = model<env.Country>('Country', countrySchema)

export default Country

App.tsx? React Native ?? ?? ??????.

'react-native-gesture-handler' ????
import React, { useCallback, useEffect, useRef, useState } from 'react'
'react-native-root-siblings'?? { RootSiblingParent } ????
'@react-navigation/native'?? { NavigationContainer, NavigationContainerRef }? ?????.
'expo-status-bar'?? { StatusBar? ExpoStatusBar? } ????
'react-native-safe-area-context'?? { SafeAreaProvider } ????
'react-native-paper'?? { ??? } ????
*? 'expo-splash-screen'?? SplashScreen?? ????
*? 'expo-notifications'?? ???? ????
'@stripe/stripe-react-native'?? { StripeProvider } ????
'./comComponents/DrawerNavigator'?? DrawerNavigator ????
*? './common/helper'?? ???? ????
*? './services/NotificationService'?? NotificationService? ????
*? './services/UserService'?? UserService? ????
'./context/GlobalContext'?? { GlobalProvider } ????
* './config/env.config'?? env? ????

??.setNotificationHandler({
  handlerNotification: async () => ({
    shouldShowAlert: ??,
    shouldPlaySound: ??,
    shouldSetBadge: ??,
  }),
})

//
// ? ???? ?? ?? ?? ???? ??? ?? ???? ?? ?????.
//
SplashScreen.preventAutoHideAsync()
  .then((result) => console.log(`SplashScreen.preventAutoHideAsync() ??: ${result}`))
  .catch(console.warn) // ??? ????? ???? ???? ?? ????.

const ? = () => {
  const [appIsReady, setAppIsReady] = useState(false)

  const responseListener = useRef<Notifications.Subscription>()
  const NavigationRef = useRef<NavigationContainerRef<StackParams>>(null)

  useEffect(() => {
    const ???? = ???() => {
      const LoggedIn = UserService.loggedIn()? ?????.
      if (loggedIn) {
        const currentUser = UserService.getCurrentUser()? ?????.
        if (??????._id) {
          helper.registerPushToken(currentUser._id)? ?????.
        } ? ?? {
          ???.??()
        }
      }
    }

    //
    // ?? ?? ?? ??
    //
    ????()

    //
    // ? ???? ???? ??? ???? ??? ????? ??? ?????(?? ?????, ????? ?? ??? ? ??).
    //
    responseListener.current = ??.addNotificationResponseReceivedListener(async (??) => {
      ???? {
        if (navigationRef.current) {
          const { ??? } = response.notification.request.content

          if (data.booking) {
            if (data.user && data.notification) {
              ??Service.markAsRead(data.user, [data.notification])? ?????.
            }
            NavigationRef.current.navigate('??', { id: data.booking })
          } ? ?? {
            NavigationRef.current.navigate('??', {})
          }
        }
      } ?? (??) {
        helper.error(err, false)
      }
    })

    ??() => {
      ??.??????(responseListener.current!)
    }
  }, [])

  setTimeout(() => {
    setAppIsReady(true)
  }, 500)

  const onReady = useCallback(async () => {
    if (appIsReady) {
      //
      // ???? ??? ?? ???? ?????! ??? ??? ????
      // `setAppIsReady`, ??? ?? ???? ?? ? ??? ??? ? ????.
      // ?? ??? ???? ? ?? ??? ??????. ??? ??,
      // ?? ?? ?? ??? ?? ?? ?? ???? ??? ????.
      // ????? ??????.
      //
      SplashScreen.hideAsync()? ?????.
    }
  }, [appIsReady])

  if (!appIsReady) {
    null? ??
  }

  ?? (
    <??? ???>
      <SafeAreaProvider>
        <???>
          <StripeProvider ?? ?? ?={env.STRIPE_PUBLISHABLE_KEY} MerchantIdentifier={env.STRIPE_MERCHANT_IDENTIFIER}>
            <RootSiblingParent>
              <NavigationContainer ref={navigationRef} onReady={onReady}>
                <??????>



<p>??? ?? ??? ??? ???? ????, ???? ????? ??? ???? ?? ? ????.</p>

<h2>
  
  
  ?? ????
</h2>

<p>?? ????? Node.js, React, MUI ? TypeScript? ??? ? ?????????. ????? ???? ????, ???, ??, ?? ? ??? ???? ??? ? ????. ????? ??? ????? ???? ???? ????? ?? ? ??? ???? ?? ??? ????? ???? ?? ???.</p>

  • ./backend/assets/ ???? CSS? ???? ???? ????.
  • ./backend/pages/ ???? React ???? ???? ????.
  • ./backend/comComponents/ ???? React ?? ??? ???? ????.
  • ./backend/services/?? API ????? ???? ???? ????.
  • ./backend/App.tsx? ??? ??? ?? React ????.
  • ./backend/index.tsx? ?? ????? ?? ??????.

TypeScript ?? ??? ./packages/bookcars-types ???? ???? ????.

???? App.tsx? ?????? App.tsx? ??? ??? ????.

?? ????? ? ???? ???? ??? ???? ?? ??? ?? ? ???? ?? ? ????.

?? ??

React Native? Expo? ???? ??? ?? ???? ?? ?? ????. Expo? React Native? ??? ??? ??? ?? ???? ????.

???, ?????, ??? ??? ??? ??(TypeScript)? ???? ?? ?????.

TypeScript? ?? ???? ???? ?? ??? ??? ????. JavaScript? ?? ?? ??? ???? ?? ??? ???? ??? ? ???? ?? ???, ???, ?? ? ?? ??? ??? ??? ??? ? ????.

?????! ? ?? ???? ????? ????.

??

  1. ??
  2. ??
  3. ??(?? ???)
  4. (VPS) ??
  5. ?? ?(??)
    1. ?? ???
    2. SSL
  6. ????? ??
  7. ??? ? ??
  8. ?? ??????
    1. Windows, Linux ? macOS
    2. ??
  9. ???? ??
  10. ??? ? ??
    1. ????
    2. ??
    3. ?? ??
  11. ?? ??
  12. ? ?? ??
  13. ?? ??? ? ?? ??
  14. ??

? ??? ???? ????: ??? ?? ????? ??? ?? ???? ?? ??? ?? ?????. ??? ??? PHP ??? ????? ?? ?? ??? ?????!

? ????? ??
? ?? ??? ????? ???? ??? ??????, ???? ?????? ????. ? ???? ?? ???? ?? ??? ?? ????. ???? ??? ???? ???? ??? ?? admin@php.cn?? ?????.

? AI ??

Undresser.AI Undress

Undresser.AI Undress

???? ?? ??? ??? ?? AI ?? ?

AI Clothes Remover

AI Clothes Remover

???? ?? ???? ??? AI ?????.

Video Face Swap

Video Face Swap

??? ??? AI ?? ?? ??? ???? ?? ???? ??? ?? ????!

???

??? ??

???++7.3.1

???++7.3.1

???? ?? ?? ?? ???

SublimeText3 ??? ??

SublimeText3 ??? ??

??? ??, ???? ?? ????.

???? 13.0.1 ???

???? 13.0.1 ???

??? PHP ?? ?? ??

???? CS6

???? CS6

??? ? ?? ??

SublimeText3 Mac ??

SublimeText3 Mac ??

? ??? ?? ?? ?????(SublimeText3)

???

??? ??

??? ????
1601
29
PHP ????
1502
276
???
node.js?? HTTP ????? ??? node.js?? HTTP ????? ??? Jul 13, 2025 am 02:18 AM

Node.js?? HTTP ??? ???? ? ?? ???? ??? ????. 1. ?? ????? ????? ??? ??? ? ?? ????? ?? ?? ? https.get () ??? ?? ??? ??? ? ?? ????? ?? ??? ?????. 2.axios? ??? ???? ? ?? ??????. ??? ??? ??? ??? ??? ??? ???/???, ?? JSON ??, ???? ?? ?????. ??? ?? ??? ????? ?? ????. 3. ?? ??? ??? ??? ??? ???? ???? ??? ??? ???? ?????.

JavaScript ??? ?? : ?? ? ?? JavaScript ??? ?? : ?? ? ?? Jul 13, 2025 am 02:43 AM

JavaScript ??? ??? ?? ?? ? ?? ???? ????. ?? ???? ???, ??, ??, ?, ???? ?? ? ??? ?????. ?? ????? ?? ?? ? ? ??? ????? ?? ??? ??? ????. ??, ?? ? ??? ?? ?? ??? ??? ??? ???? ??? ??? ???? ??? ?? ??? ????. ?? ? ????? ??? ???? ? ??? ? ??? TypeofNull? ??? ?????? ??? ? ????. ? ? ?? ??? ???? ?????? ????? ???? ??? ???? ? ??? ? ? ????.

JavaScript Time Object, ??? Google Chrome? EACTEXE, ? ?? ? ???? ?????. JavaScript Time Object, ??? Google Chrome? EACTEXE, ? ?? ? ???? ?????. Jul 08, 2025 pm 02:27 PM

?????, JavaScript ???! ?? ? JavaScript ??? ?? ?? ?????! ?? ?? ??? ??? ??? ? ????. Deno?? Oracle? ?? ??, ??? JavaScript ?? ??? ????, Google Chrome ???? ? ??? ??? ???? ?????. ?????! Deno Oracle? "JavaScript"??? ????? Oracle? ?? ??? ??? ??????. Node.js? Deno? ??? ? Ryan Dahl? ??? ?????? ???? ????? JavaScript? ??? ???? Oracle? ????? ???? ?????.

?? ??? : JavaScript? ??, ?? ?? ? ?? ????? ?? ??? : JavaScript? ??, ?? ?? ? ?? ????? Jul 08, 2025 am 02:40 AM

??? JavaScript?? ??? ??? ?????? ?? ???????. ?? ??, ?? ?? ? ??? ??? ?? ????? ????? ?????. 1. ?? ??? ??? ????? ???? ??. ()? ?? ??? ??? ?????. ?. ()? ?? ??? ?? ??? ??? ?? ? ? ????. 2. ?? ??? .catch ()? ???? ?? ??? ??? ?? ??? ??????, ??? ???? ???? ????? ??? ? ????. 3. Promise.all ()? ?? ????? (?? ?? ?? ? ??????? ??), Promise.Race () (? ?? ??? ?? ?) ? Promise.AllSettled () (?? ??? ???? ??)

?? API? ???? ??? ???? ??? ?????? ?? API? ???? ??? ???? ??? ?????? Jul 08, 2025 am 02:43 AM

Cacheapi? ?????? ?? ???? ??? ???? ???, ?? ??? ??? ?? ???? ? ??? ?? ? ???? ??? ??????. 1. ???? ????, ??? ??, ?? ?? ?? ???? ???? ??? ? ????. 2. ??? ?? ?? ??? ?? ? ? ????. 3. ?? ?? ?? ?? ?? ??? ??? ?? ?????. 4. ??? ???? ?? ?? ???? ?? ?? ?? ?? ?? ???? ?? ?? ??? ??? ? ????. 5. ?? ???? ??, ??? ??? ? ??? ??, ?? ??? ? ?? ???? ???? ???? ? ?? ?????. 6.?? ??? ?? ?? ?? ??, ???? ?? ? HTTP ?? ????? ?????? ???????.

JS Roundup : JavaScript ??? ??? ?? ?? ??? JS Roundup : JavaScript ??? ??? ?? ?? ??? Jul 08, 2025 am 02:24 AM

JavaScript? ??? ??? ?? ??, ? ? ? ?? ???? ???? ??? ??? ?????. 1. ?? ??? ?? ??? ???? ??? ??? ??? ??? ?? WebAPI? ?????. 2. WebAPI? ??????? ??? ?? ? ? ??? ?? ??? (??? ?? ?? ???? ??)? ????. 3. ??? ??? ?? ??? ?? ??? ?????. ?? ??? ??? ????? ??? ??? ?? ? ???? ?????. 4. ???? ?? (? : Promise. 5. ??? ??? ???? ?? ???? ???? ?? ?? ?? ??? ????? ? ??????.

JavaScript DOM ????? ??? ?? ? ? ?? ??? ????? JavaScript DOM ????? ??? ?? ? ? ?? ??? ????? Jul 08, 2025 am 02:36 AM

??? ??? ?? ???? ?? ??? ???? ?? ??? ??? ?? ??? ?? ??? ?????. 1. ??? ?? : ?? ??? ?? ? ? ???? ?? ??? ???? ??? ???? ??????. ?? ??, ??? ?? ? ? ?? ??? ?? ? ?? ??? ??????. 2. ??? ?? : ??? ???? ?? ?? ??? ?? ???? ????? ? ?? ?????? ???? ????? ? ?? ?? ??? true? ??????. 3. ?? ???? ?? ?? ??? ?? ??, ?? ??? ? ?? ???? ?????. 4. DOM ??? ???? ??, ?? ? ??? ? ??? ??? ?? ???? ?? ???? ?????.

MAP ? ?? ??? ?? ??? JS ??? ? MAP ? ?? ??? ?? ??? JS ??? ? Jul 10, 2025 am 11:41 AM

JavaScript ???? ? ? ?? ??? ???? ??? ???? ?? ??? ????. 1. ??? ???? ??? ??, ??, ??? ?? ? ??? ??? ?? ? ? ????. 2. ?? ? findIndex? ?? ?? ?? ???? ?? ? ?????. 3. ??? ??? ????? ?? ?? ??? ???? ? ?????. 4. ??? ?? ? ? ??? ?? ??? ?????. 5. ???? ??? ?? ??? ??? ? ?? ?????????. ??? ??? ????? ???? ????? ????.

See all articles