Skip to content
Snippets Groups Projects
Commit c08e4416 authored by Fredrik Monsen's avatar Fredrik Monsen
Browse files

Changes to server.js

parent 8aaab32c
No related branches found
No related tags found
No related merge requests found
Pipeline #22534 passed
<component name="ProjectDictionaryState">
<dictionary name="Fredrik" />
</component>
\ No newline at end of file
<component name="InspectionProjectProfileManager">
<profile version="1.0">
<option name="myName" value="Project Default" />
<inspection_tool class="SpellCheckingInspection" enabled="true" level="TYPO" enabled_by_default="true">
<option name="processCode" value="true" />
<option name="processLiterals" value="true" />
<option name="processComments" value="false" />
</inspection_tool>
</profile>
</component>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="JavaScriptSettings">
<option name="languageLevel" value="ES6" />
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" />
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/SU2_Oving5.iml" filepath="$PROJECT_DIR$/SU2_Oving5.iml" />
</modules>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ChangeListManager">
<list default="true" id="bb3412d0-13d1-47f0-b5da-34f7cc7188bf" name="Default" comment="">
<change afterPath="$PROJECT_DIR$/.idea/dictionaries/Fredrik.xml" afterDir="false" />
<change afterPath="$PROJECT_DIR$/.idea/inspectionProfiles/Project_Default.xml" afterDir="false" />
<change afterPath="$PROJECT_DIR$/.idea/misc.xml" afterDir="false" />
<change afterPath="$PROJECT_DIR$/.idea/modules.xml" afterDir="false" />
<change afterPath="$PROJECT_DIR$/.idea/vcs.xml" afterDir="false" />
<change afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change afterPath="$PROJECT_DIR$/SU2_Oving5.iml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/package.json" beforeDir="false" afterPath="$PROJECT_DIR$/package.json" afterDir="false" />
<change beforePath="$PROJECT_DIR$/server.js" beforeDir="false" afterPath="$PROJECT_DIR$/server.js" afterDir="false" />
</list>
<ignored path="$PROJECT_DIR$/out/" />
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
<option name="TRACKING_ENABLED" value="true" />
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
<option name="LAST_RESOLUTION" value="IGNORE" />
</component>
<component name="FileEditorManager">
<leaf>
<file leaf-file-name="persondao.js" pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/dao/persondao.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="297">
<caret line="38" column="6" selection-start-line="38" selection-start-column="6" selection-end-line="38" selection-end-column="6" />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="server.js" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/server.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="342">
<caret line="52" lean-forward="true" selection-start-line="52" selection-end-line="52" />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="package.json" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/package.json">
<provider selected="true" editor-type-id="text-editor" />
</entry>
</file>
</leaf>
</component>
<component name="Git.Settings">
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
</component>
<component name="IdeDocumentHistory">
<option name="CHANGED_PATHS">
<list>
<option value="$PROJECT_DIR$/dao/persondao.js" />
<option value="$PROJECT_DIR$/server.js" />
<option value="$PROJECT_DIR$/.gitignore" />
</list>
</option>
</component>
<component name="JsBuildToolGruntFileManager" detection-done="true" sorting="DEFINITION_ORDER" />
<component name="JsBuildToolPackageJson" detection-done="true" sorting="DEFINITION_ORDER" />
<component name="JsFlowSettings">
<service-enabled>true</service-enabled>
<exe-path />
<other-services-enabled>true</other-services-enabled>
<auto-save>true</auto-save>
</component>
<component name="JsGulpfileManager">
<detection-done>true</detection-done>
<sorting>DEFINITION_ORDER</sorting>
</component>
<component name="NodeModulesDirectoryManager">
<handled-path value="$PROJECT_DIR$/node_modules" />
</component>
<component name="ProjectFrameBounds" extendedState="6">
<option name="width" value="1280" />
<option name="height" value="800" />
</component>
<component name="ProjectLevelVcsManager" settingsEditedManually="true" />
<component name="ProjectView">
<navigator proportions="" version="1">
<foldersAlwaysOnTop value="true" />
</navigator>
<panes>
<pane id="Scope" />
<pane id="ProjectPane">
<subPane>
<expand>
<path>
<item name="SU2_Oving5" type="b2602c69:ProjectViewProjectNode" />
<item name="SU2_Oving5" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="SU2_Oving5" type="b2602c69:ProjectViewProjectNode" />
<item name="SU2_Oving5" type="462c0819:PsiDirectoryNode" />
<item name=".idea" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="SU2_Oving5" type="b2602c69:ProjectViewProjectNode" />
<item name="SU2_Oving5" type="462c0819:PsiDirectoryNode" />
<item name="dao" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="SU2_Oving5" type="b2602c69:ProjectViewProjectNode" />
<item name="External Libraries" type="cb654da1:ExternalLibrariesNode" />
</path>
</expand>
<select />
</subPane>
</pane>
<pane id="AndroidView" />
<pane id="PackagesPane" />
</panes>
</component>
<component name="PropertiesComponent">
<property name="JavaScriptWeakerCompletionTypeGuess" value="true" />
<property name="WebServerToolWindowFactoryState" value="false" />
<property name="add_unversioned_files" value="$PROJECT_DIR$/.gitignore&#10;true" />
<property name="aspect.path.notification.shown" value="true" />
<property name="node.js.detected.package.prettier" value="true" />
<property name="node.js.path.for.package.prettier" value="project" />
<property name="node.js.selected.package.prettier" value="" />
<property name="nodejs_interpreter_path.stuck_in_default_project" value="undefined stuck path" />
<property name="nodejs_npm_path_reset_for_default_project" value="true" />
<property name="settings.editor.selected.configurable" value="Settings.JavaScript" />
</component>
<component name="RunDashboard">
<option name="ruleStates">
<list>
<RuleState>
<option name="name" value="ConfigurationTypeDashboardGroupingRule" />
</RuleState>
<RuleState>
<option name="name" value="StatusDashboardGroupingRule" />
</RuleState>
</list>
</option>
</component>
<component name="RunManager">
<configuration default="true" type="Application" factoryName="Application">
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
</configuration>
<configuration default="true" type="JUnit" factoryName="JUnit">
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" />
<option name="PACKAGE_NAME" />
<option name="MAIN_CLASS_NAME" />
<option name="METHOD_NAME" />
<option name="TEST_OBJECT" value="class" />
<option name="VM_PARAMETERS" value="-ea" />
<option name="PARAMETERS" />
<option name="WORKING_DIRECTORY" value="%MODULE_WORKING_DIR%" />
<option name="PASS_PARENT_ENVS" value="true" />
<option name="TEST_SEARCH_SCOPE">
<value defaultName="singleModule" />
</option>
<patterns />
</configuration>
<configuration default="true" type="TestNG" factoryName="TestNG">
<option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
<option name="ALTERNATIVE_JRE_PATH" />
<option name="SUITE_NAME" />
<option name="PACKAGE_NAME" />
<option name="MAIN_CLASS_NAME" />
<option name="METHOD_NAME" />
<option name="GROUP_NAME" />
<option name="TEST_OBJECT" value="CLASS" />
<option name="VM_PARAMETERS" value="-ea" />
<option name="PARAMETERS" />
<option name="WORKING_DIRECTORY" value="%MODULE_WORKING_DIR%" />
<option name="OUTPUT_DIRECTORY" />
<option name="PASS_PARENT_ENVS" value="true" />
<option name="TEST_SEARCH_SCOPE">
<value defaultName="singleModule" />
</option>
<option name="USE_DEFAULT_REPORTERS" value="false" />
<option name="PROPERTIES_FILE" />
<properties />
<listeners />
</configuration>
</component>
<component name="SvnConfiguration">
<configuration />
</component>
<component name="TaskManager">
<task active="true" id="Default" summary="Default task">
<changelist id="bb3412d0-13d1-47f0-b5da-34f7cc7188bf" name="Default" comment="" />
<created>1537262806237</created>
<option name="number" value="Default" />
<option name="presentableId" value="Default" />
<updated>1537262806237</updated>
<workItem from="1537262810378" duration="2835000" />
</task>
<task id="LOCAL-00001" summary="Added update and delete">
<created>1537265626237</created>
<option name="number" value="00001" />
<option name="presentableId" value="LOCAL-00001" />
<option name="project" value="LOCAL" />
<updated>1537265626237</updated>
</task>
<option name="localTasksCounter" value="2" />
<servers />
</component>
<component name="TimeTrackingManager">
<option name="totallyTimeSpent" value="2835000" />
</component>
<component name="ToolWindowManager">
<frame x="0" y="23" width="1280" height="777" extended-state="6" />
<editor active="true" />
<layout>
<window_info anchor="right" id="Palette" />
<window_info anchor="bottom" id="TODO" order="6" />
<window_info anchor="right" id="Palette&#9;" />
<window_info id="Image Layers" />
<window_info anchor="right" id="Capture Analysis" />
<window_info active="true" anchor="bottom" id="Event Log" sideWeight="0.50080776" side_tool="true" visible="true" weight="0.29558823" />
<window_info anchor="right" id="Maven Projects" />
<window_info anchor="bottom" id="Database Changes" show_stripe_button="false" />
<window_info anchor="bottom" id="Run" order="2" />
<window_info anchor="bottom" id="Version Control" />
<window_info anchor="bottom" id="Terminal" sideWeight="0.49919224" visible="true" weight="0.29558823" />
<window_info id="Capture Tool" />
<window_info id="Designer" />
<window_info content_ui="combo" id="Project" order="0" visible="true" weight="0.24959612" />
<window_info anchor="right" id="Database" />
<window_info id="Structure" order="1" side_tool="true" weight="0.25" />
<window_info anchor="right" id="Ant Build" order="1" weight="0.25" />
<window_info id="UI Designer" />
<window_info anchor="right" id="Theme Preview" />
<window_info anchor="bottom" id="Debug" order="3" weight="0.4" />
<window_info id="Favorites" side_tool="true" />
<window_info anchor="bottom" id="Find" order="1" />
<window_info anchor="right" id="Commander" order="0" weight="0.4" />
<window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
<window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" />
<window_info anchor="bottom" id="Message" order="0" />
<window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
</layout>
</component>
<component name="TypeScriptGeneratedFilesManager">
<option name="version" value="1" />
</component>
<component name="VcsContentAnnotationSettings">
<option name="myLimit" value="2678400000" />
</component>
<component name="VcsManagerConfiguration">
<MESSAGE value="Added update and delete" />
<option name="LAST_COMMIT_MESSAGE" value="Added update and delete" />
</component>
<component name="editorHistoryManager">
<entry file="file://$PROJECT_DIR$/.gitignore">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-2656">
<caret line="3" selection-start-line="3" selection-end-line="3" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/package.json">
<provider selected="true" editor-type-id="text-editor" />
</entry>
<entry file="file://$PROJECT_DIR$/server.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="342">
<caret line="52" lean-forward="true" selection-start-line="52" selection-end-line="52" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/dao/persondao.js">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="297">
<caret line="38" column="6" selection-start-line="38" selection-start-column="6" selection-end-line="38" selection-end-column="6" />
</state>
</provider>
</entry>
</component>
<component name="masterDetails">
<states>
<state key="ProjectJDKs.UI">
<settings>
<last-edited>1.8</last-edited>
<splitter-proportions>
<option name="proportions">
<list>
<option value="0.2" />
</list>
</option>
</splitter-proportions>
</settings>
</state>
</states>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
\ No newline at end of file
...@@ -13,10 +13,12 @@ ...@@ -13,10 +13,12 @@
"body-parser": "^1.18.3", "body-parser": "^1.18.3",
"express": "^4.16.3", "express": "^4.16.3",
"fs": "0.0.1-security", "fs": "0.0.1-security",
"jest": "^23.6.0",
"mysql": "^2.16.0" "mysql": "^2.16.0"
}, },
"scripts": { "scripts": {
"test": "jest" "test": "jest"
},
"devDependencies": {
"jest": "^23.6.0"
} }
} }
...@@ -41,4 +41,12 @@ app.post("/person", (req, res) => { ...@@ -41,4 +41,12 @@ app.post("/person", (req, res) => {
}); });
}); });
app.post("/person", (req, res) => {
console.log("/person: fikk POST request fra klient");
personDao.updateOne(req.body, (status, data) => {
res.status(status);
res.json(data);
});
});
var server = app.listen(8080); var server = app.listen(8080);
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment